vlc/vlc-2.0 | branch: master | Pierre Ynard <linkfa...@yahoo.fr> | Sat Aug 31 
17:29:33 2013 +0200| [001cf6d04be9eab4de2b15252cfafe2939170b4f] | committer: 
Felix Paul Kühne

lua dkjson: use us_tostring() to fix locale issues with decimals

This only fixes encoding but we don't use decoding anyway.

Fixes #8854

(cherry picked from commit 4316ff068b14eff72d3adecd432a602a453db95d)
Signed-off-by: Felix Paul Kühne <fkue...@videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=001cf6d04be9eab4de2b15252cfafe2939170b4f
---

 share/lua/modules/dkjson.lua |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/share/lua/modules/dkjson.lua b/share/lua/modules/dkjson.lua
index 987587b..05bf11c 100644
--- a/share/lua/modules/dkjson.lua
+++ b/share/lua/modules/dkjson.lua
@@ -196,6 +196,8 @@ local strrep, gsub, strsub, strbyte, strchar, strfind, 
strlen, strformat =
       string.rep, string.gsub, string.sub, string.byte, string.char,
       string.find, string.len, string.format
 local concat = table.concat
+local common = require ("common")
+local us_tostring = common.us_tostring
 
 if _VERSION == 'Lua 5.1' then
   local function noglobals (s,k,v) error ("global access: " .. k, 2) end
@@ -367,7 +369,7 @@ encode2 = function (value, indent, level, buffer, buflen, 
tables, globalorder)
       -- This is the behaviour of the original JSON implementation.
       s = "null"
     else
-      s = tostring (value)
+      s = us_tostring (value)
     end
     buflen = buflen + 1
     buffer[buflen] = s

_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to