aboutsummaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
authorMark Pulford <mark@kyne.com.au>2011-10-07 23:55:49 +1030
committerMark Pulford <mark@kyne.com.au>2011-10-07 23:55:49 +1030
commit049691cb11115fbdb750021556cad3507fad4e69 (patch)
tree3ef83227a086c2dbd70633a55a8425335a8e92fb /README
parent48c5cf183fa7cab608168fdec2406a1ca3cb2c11 (diff)
downloadlua-cjson-049691cb11115fbdb750021556cad3507fad4e69.tar.gz
lua-cjson-049691cb11115fbdb750021556cad3507fad4e69.tar.bz2
lua-cjson-049691cb11115fbdb750021556cad3507fad4e69.zip
Add USE_POSIX_SETLOCALE option
Add USE_POSIX_SETLOCALE option for platforms missing uselocale(). Document locale options in README, Makefile & rockspec. Also: - Rename USE_POSIX_LOCALE define to USE_POSIX_USELOCALE. - Use uselocale() by default through Makefile (Linux, OSX). - Use setlocale() by default through rockspec (other platforms).
Diffstat (limited to 'README')
-rw-r--r--README12
1 files changed, 12 insertions, 0 deletions
diff --git a/README b/README
index e8c3abe..f863d73 100644
--- a/README
+++ b/README
@@ -309,6 +309,18 @@ Lua CJSON will generate an error if asked to serialise Lua functions,
309userdata, lightuserdata or threads. 309userdata, lightuserdata or threads.
310 310
311 311
312Locale handling
313---------------
314
315Lua CJSON uses strtod() and snprintf() to perform numeric conversion
316as they are usually well supported, fast and bug free.
317
318To ensure JSON encoding/decoding works correctly for locales using
319comma decimal separators, Lua CJSON must be compiled with either
320USE_POSIX_USELOCALE or USE_POSIX_SETLOCALE. See the Makefile or the
321rockspec for details.
322
323
312References 324References
313========== 325==========
314 326