[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: lujit - Malformed number
- From: Alexander Gladysh <agladysh@...>
- Date: Sat, 4 Sep 2010 14:41:25 +0400
> This is really deep inside libc in strtod(), which can neither be
> easily replaced, nor easily convinced to ignore the locale. Lua
> has some NLS-specific workaround, but I had to remove these from
> the codebase to reduce dependencies (not every embedded OS/libc
> supports the NLS APIs and structs).
> Try os.setlocale("C", "numeric") or the equivalent C call after
> all other libraries have been initialized.
Um. Mike, are you saying that in LJ2 decimal separator is dependent on locale?
Sorry, but this is horrible! In Lua 5.0 this was a huge PITA (at least
for me). Changing C locale before loading Lua code and reverting it
back after all files are loaded? And what if I need to load Lua code
along the way?