€ is coming instead of regular Euro sign in ISO-8859-1 in Magento

做~自己de王妃 提交于 2019-12-07 04:11:49

问题


€ 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!