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

Issue Type: Bug Created: 2009-04-03T13:32:56.000+0000 Last Updated: 2009-04-04T12:01:01.000+0000 Status: Resolved Fix version(s): - 1.8.0 (30/Apr/09)

Reporter: Andrew Magruder (amgarude) Assignee: Thomas Weidner (thomas) Tags: - Zend_Currency

Related issues: Attachments:


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.


Posted by Thomas Weidner (thomas) on 2009-04-04T10:45:46.000+0000

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.

Posted by Thomas Weidner (thomas) on 2009-04-04T12:00:59.000+0000

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.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.