Make real number encoding and decoding work under all locales
The decimal point '.' is changed to locale's decimal point before/after JSON conversion to make C standard library's locale-specific string conversion functions work correctly. All the tests now call setlocale(LC_ALL, "") on startup to use the locale set in the environment. Fixes GH-32.
This commit is contained in:
@@ -387,7 +387,7 @@ static void test_circular()
|
||||
}
|
||||
|
||||
|
||||
int main()
|
||||
static void run_tests()
|
||||
{
|
||||
test_misc();
|
||||
test_insert();
|
||||
@@ -395,6 +395,4 @@ int main()
|
||||
test_clear();
|
||||
test_extend();
|
||||
test_circular();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user