You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some JOSN libraries (like the current ccan/json) use locale-dependent C routines like strtod() and snprintf() for reading and writing numbers. In a program that sets a C locale with a comma as the decimal separator (like Russian ru_RU.UTF-8) this will lead to implicit truncation of numbers (strtod() will ignore . and everything after it) and writing broken JSONs (because the numbers in the file will have commas instead of periods).
It would be nice to know which libraries fail to read and write numbers with a locale that use a comma as the decimal separator. If a library doesn't pass this test, others don't actually matter, because the library is useless in practice.
The text was updated successfully, but these errors were encountered:
Some JOSN libraries (like the current
ccan/json
) use locale-dependent C routines likestrtod()
andsnprintf()
for reading and writing numbers. In a program that sets a C locale with a comma as the decimal separator (like Russianru_RU.UTF-8
) this will lead to implicit truncation of numbers (strtod()
will ignore.
and everything after it) and writing broken JSONs (because the numbers in the file will have commas instead of periods).It would be nice to know which libraries fail to read and write numbers with a locale that use a comma as the decimal separator. If a library doesn't pass this test, others don't actually matter, because the library is useless in practice.
The text was updated successfully, but these errors were encountered: