Make real number encoding and decoding work under all locales
authorPetri Lehtinen <petri@digip.org>
Sun, 2 Oct 2011 18:27:53 +0000 (21:27 +0300)
committerPetri Lehtinen <petri@digip.org>
Sun, 2 Oct 2011 18:31:17 +0000 (21:31 +0300)
commitd7ddbf366197605642f725cce6165dfb179a114e
tree56da549f28dbe1631a2539374c53b0c85293e2c1
parentb6d0191e51003dfdfd2dcb36a52baafcdbf4246c
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.
24 files changed:
configure.ac
doc/conformance.rst
src/Makefile.am
src/dump.c
src/jansson_config.h.in
src/jansson_config.h.win32
src/jansson_private.h
src/load.c
src/strconv.c [new file with mode: 0644]
test/bin/json_process.c
test/suites/api/test_array.c
test/suites/api/test_copy.c
test/suites/api/test_dump.c
test/suites/api/test_dump_callback.c
test/suites/api/test_equal.c
test/suites/api/test_load.c
test/suites/api/test_loadb.c
test/suites/api/test_memory_funcs.c
test/suites/api/test_number.c
test/suites/api/test_object.c
test/suites/api/test_pack.c
test/suites/api/test_simple.c
test/suites/api/test_unpack.c
test/suites/api/util.h