Localization problem with float
Status: Alpha
Brought to you by:
whythluckystiff
The streaming doesn't respect the localization, i.e., a
number like 31,56 that uses a comma to separated the
decimals in some countries, differently from the
english 31.56 that uses a dot, confuses YAML while
loading the data back.
[dewd@localhost t_]$ ruby -e "require 'gtk2'; require
'yaml'; p 31.5"
31,5
[dewd@localhost t_]$ ruby -e "require 'gtk2'; require
'yaml'; p YAML::load(31.5.to_yaml)"
315
When gtk2 is required it changes the localization.
The country in particular is Brazil and the language is
portuguese.
Thanks,
Joao
Logged In: YES
user_id=114289
What YAML is generated by...
$ ruby -e "require 'gtk2'; require 'yaml'; y 31.5"