Currency display issues with Magento

Last modified by gora.mohanty on Thu, June 25, 2009 08:59
Source|Old Revisions  

There are sometimes what seem to be display issues with Magento on Microsoft Windows (and, probably other platforms/browsers with inadequate Unicode support). A common manifestation of this is the display of INR (Indian rupees) as “Rp” instead of “Rs”, something which has led to multiple queries on the forums. However, other currencies are also affected.

The INR issue is because Magento, through Zend, correctly uses the Unicode codepoint, U20A8, for the currency symbol, instead of the string “Rs”. Unfortunately, on Microsoft Windows, the default fonts do not seem to provide coverage of this codepoint. Hence, IE shows a box, and Firefox shows “Rp” (this is probably a bug in Firefox’s fallback mechanism). Similar issues might be encountered for other infrequently used currency symbols, e.g., the ones in the Unicode block U20A0-U20CF.

One solution for the INR problem is to edit lib/Zend/Locale/Data/en.xml (assuming one is using an English variant as a locale, e.g., en_US or en_UK. Else, edit the appropriate base locale, or variant, e.g., edit fr.xml for French variants), find the entry for “<currency type=”INR”>”, and within it replace “<symbol><U20A8></symbol>” (here, <U20A8> is the Unicode character, and might show up differently depending on your editor and operating system), and replace it with “<symbol>Rs</symbol>”. Do not forget to refresh the cache. A better method would be to override this setting with a local modification within Magento to lib/Zend/Locale/Data/en.xml, but I am new to Magento and am not sure how to do this.