power-media / prado3

Automatically exported from code.google.com/p/prado3
Other
0 stars 0 forks source link

NumberFormat fails if LC_ALL locale provides non-english notation (patch attached) #485

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
When setting locale to a value that does not use english number notation (e.g. 
it_IT uses comma for decimals and point for thousands), NumberFormat fails to 
parse and build the decimals for the PHP cast to string converts the float 
(point-decimal) to string (comma-decimal) and the strpos fails to catch the 
decimal.
The attached patch makes things work correctly by evaluating numbers as they 
are without pre-cast to string.
Test case attached.

(Patch provided by drigolin)

Original issue reported on code.google.com by ciromat...@gmail.com on 12 Sep 2013 at 10:01

Attachments:

GoogleCodeExporter commented 8 years ago
Patch applied as r3320, thank you!

Original comment by ctrlal...@gmail.com on 13 Sep 2013 at 7:01

GoogleCodeExporter commented 8 years ago
Reopening since some unit tests are failing and needs further investigation

Original comment by ctrlal...@gmail.com on 13 Sep 2013 at 8:21

GoogleCodeExporter commented 8 years ago
Moved to github: https://github.com/pradosoft/prado/issues

Original comment by ctrlal...@gmail.com on 1 Oct 2013 at 10:14