lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Roberto Ierusalimschy wrote:
I think the more important addition would be an easy Lua way to set the locale to use the UTF8 encoding.


os.setlocale("UTF-8") ?

Yes, I suppose I should try that. Looking at the implementation it looks like it should work. But the documentation for setlocale on Win32 says nothing about the string "UTF-8" being supported. And even in Unix docs, it's pretty sketchy. I see that you can say "en-us.utf-8", but does it REQUIRE a language code? And is this cross-platform?

Anyway, if this can work across platforms, that's great!

--
chris marrin              ,""$, "As a general rule,don't solve puzzles
chris@marrin.com        b`    $  that open portals to Hell" ,,.
        ,.`           ,b`    ,`                            , 1$'
     ,|`             mP    ,`                              :$$'     ,mm
   ,b"              b"   ,`            ,mm      m$$    ,m         ,`P$$
  m$`             ,b`  .` ,mm        ,'|$P   ,|"1$`  ,b$P       ,`  :$1
 b$`             ,$: :,`` |$$      ,`   $$` ,|` ,$$,,`"$$     .`    :$|
b$|            _m$`,:`    :$1   ,`     ,$Pm|`    `    :$$,..;"'     |$:
P$b,      _;b$$b$1"       |$$ ,`      ,$$"             ``'          $$
 ```"```'"    `"`         `""`        ""`                          ,P`