问题
€ is displayed instead of Euro sign in ISO-8859-1
I am using this character set for my French, Spanish, German and Italian stores.
Please tell me how to fix this euro sign problem or any other solution to display special characters of above listed languages.
回答1:
There is no euro sign character in ISO 8859-1; it was introduced in ISO 8859-15 and it is present in UTF-8, however it seems you just need to use € html entity.
回答2:
Magento uses UTF-8 everywhere: Templates, database, translation files. If you send a content-type header for ISO-8859-1, all data is still UTF-8 encoded but will be displayed incorrect (that's what you see, a UTF-8 euro sign, interpreted as ISO-8859-1).
There is no reason to prefer ISO-8859-1 over UTF-8. If you add own files or data which is in ISO-8859-1, convert them first.
回答3:
I have done like,
<?php echo mb_convert_encoding($this->__('Careers'), "UTF-8", "HTML-ENTITIES"); ?>
and keep charset default UTF-8.
来源:https://stackoverflow.com/questions/15040294/%c3%a2-%c2%ac-is-coming-instead-of-regular-euro-sign-in-iso-8859-1-in-magento