How to make Magento support some French Characters

2019-07-16 03:32发布

问题:

I've been trying to make Magento support some french characters but haven't got any success so far.

The French text that I would want to display is:

Vous aimerez peut-être aussi

But somehow, it appears like this:

Its been the same with several other characters. Magento does use UTF-8 by default, but still these characters are not being displayed (surprisingly, because StackOverflow is using UTF-8 and is able to display the characters)
I noticed that ISO-8859-1 is able to display them, tried to change the default character encoding by editing the following file:

app/code/core/Mage/Page/etc/config.xml

And changed the node <default_charset>'s value to ISO-8859-1.

Now Firefox displays the following in Page Info, and the text is still not being displayed properly:

I am using Eclipse to edit the phtml files and often these french texts are being generated by php code.

Any idea what I might be doing wrong?

回答1:

you have wrong encoding either in database or in documents , translation files. Ensure that the encoding is utf-8 all the way in all places that you deal with

  • magento
  • database
  • document encoding while editing