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

筅森魡賤 提交于 2019-12-05 06:11:08

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.

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.

I have done like,

     <?php echo mb_convert_encoding($this->__('Careers'), "UTF-8", "HTML-ENTITIES"); ?>

and keep charset default UTF-8.

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