lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi there !

I am using the yaml bindings from Andrew Danforth and he uses lua_isnumber to detect if a string is actually a number. The yaml specification does not rely on the current locale to parse floats: a float uses a '.' (dot) before the fractional part and that's it but "lua_isnumber" relies on strtod which uses the current locale. If you are unfortunate like me and your locale says "use commas", well yaml will just not parse numbers but will return strings, which is wrong.

This looks like an important bug and I am surprised to find it in a 2 year old release...

Am I missing something ?


                                                               Gaspard