ZF-6208: Currency symbol not correctly parsed from locale files


At least two currencies (RON and INR) don't have the correct symbol when calling toCurrency on a Zend_Currency object. The specific issue is that the symbol value in the XML isn't parsed at all, so unparsed text is added to the currency string. As a result, one ends up with "formatted" currency values which look like this:

0≤Rs.|1≤Re.|1 1,446.64

For the en_IN locale, for a INR ISO currency code value. In addition to breaking for the Indian Rupee, this breaks in similar ways for other locales and for the Romania Leu.

The issue is that the value is encoded per this specification:

Since this effects a small number a currencies at the moment, it would seem the simplest thing to do is to special case them rather than build a general purpose parser because the XML format in this case is clearly sub-par.


For the locale en_IN, the currency INR is defined with the currency sign "Rp" and RON has no defined currency sign. This value is returned from the parsed CLDR data.

Please give reproducable code, otherwise related to the not reproducable description this issue will be closed as non-issue.

Feature added even if the given description does not use this feature. Actually there is only one currency within several locales which makes use of this feature.