From: Victor B. <so...@te...> - 2012-11-15 11:43:38
|
Hello, This is what I get: >lua.exe Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio > print(1.234, string.format("%f", 2.345), os.setlocale()) 1.234 2.345000 C > require("wx") > print(1.234, string.format("%f", 2.345), os.setlocale()) 1,234 2,345000 Spanish_Spain.1252 > print(os.setlocale("", "all")) Spanish_Spain.1252 > print(1.234, string.format("%f", 2.345), os.setlocale()) 1,234 2,345000 Spanish_Spain.1252 > manual from lua.51 says: If locale is the empty string, the current locale is set to an implementation-defined native locale. May be Spanish locale was hard coded in my lua.exe compilation and wxlua calls os.setlocale("", "all")? I have used os.setlocale("C") in my lua script after require"wx" and everything works as I expected (but of course wx.wxMessageBox prints 1.234 which is not anoying for me). Would be good idea to mention in the FAQ what is happenig with the locale. Best Regards |