Issue with character sets

The text I retrieve from a site shows strange characters (usually for foreign characters). Is there anything that I can do from this side to show the right characters? Is there a particular encoding on the PHP side that could fix this?

Here is the text:

��Joseph, fils de David, ne crains pas��levangileauquotidien.org

Saint Ephrem (v. 306-373), diacre en Syrie, docteur de l’�gliselevangileauquotidien.org

Hymne pour la Nativit�

Joseph embrassaitle Fils du P�re c�lestecomme un nouveau-n�,et il le servait comme son Dieu.Il s’y complaisaitcomme en la bont� m�me�;et il le r�v�raitlui le juste par excellence (Mt 1,19).Grande �tait sa perplexit�! ��Comment m’est-il donn�,toi le Fils du Tr�s-Haut,d’avoir en toi un fils�?Contre ta m�re je m’irritais,et je pensais la renvoyer.Je ne savais pasqu’en son sein �tait un grand tr�sor,qui dans ma pauvret�soudain me rendait riche.� Le roi Davida surgi parmi mes anc�treset il a ceint la couronne.Qu’il est grand le d�nuemento� je suis parvenu�!Au lieu d’�tre roi je suis ouvrier�;mais une couronne m’est advenuepuisque sur mon c�ur reposele Ma�tre de toutes les couronnes.��levangileauquotidien.org

Yes, there should be. Do you know what character encoding your server is using for these pages? And what character encoding do you have on the page itself, if any?

I don’t really know what encoding is used for the original php page. My page has charset=iso-8859-1. I’d prefer a encoding/decoding script where I wouldn’t have to change the charset.

Thanks.

You can check in your browser what encoding your web server is set to. That setting tends to override anything you have on your page. I Chrome, for example, go to View > Encoding and it will give you an idea of the actual page encoding.

Generally, UTF-8 is supposed to be the most reliable, as it includes the widest range of characters. (However, according to some, it is not always reliable for European langes with accented characters.)

You could try uft-8 instead, but you may first need to change your server settings. There are various ways to do that, but you could perhaps also ask your web host about it.