lua-users home
lua-l archive

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


Thank you Rici, thank you Phillipe.

I've put in the beginning of the script the line:

os.setlocale('pt_BR','ctype')

and worked okey.

But, i'm still researching about. I'not sure, but I think that coult it be a bug on locale on unstable (?)

Look out: I've made a little script to print all the locale environment.

----getenv.lua--------

print(os.getenv("LANG"))
print(os.getenv("LC_CTYPE"))
print(os.getenv("LC_NUMERIC"))
print(os.getenv("LC_TIME"))
print(os.getenv("LC_COLLATE"))
print(os.getenv("LC_MONETARY"))
print(os.getenv("LC_MESSAGES"))
print(os.getenv("LC_PAPER"))
print(os.getenv("LC_NAME"))
print(os.getenv("LC_ADDRESS"))
print(os.getenv("LC_TELEPHONE"))
print(os.getenv("LC_MEASUREMENT"))
print(os.getenv("LC_IDENTIFICATION"))
print(os.getenv("LC_ALL"))

-------getenv.lua ---------

and now:

MCid299a:~/lua$ locale
LANG=pt_BR
LC_CTYPE="pt_BR"
LC_NUMERIC="pt_BR"
LC_TIME="pt_BR"
LC_COLLATE="pt_BR"
LC_MONETARY="pt_BR"
LC_MESSAGES="pt_BR"
LC_PAPER="pt_BR"
LC_NAME="pt_BR"
LC_ADDRESS="pt_BR"
LC_TELEPHONE="pt_BR"
LC_MEASUREMENT="pt_BR"
LC_IDENTIFICATION="pt_BR"
LC_ALL=

MCid299a:~/lua$ lua getenv.lua
pt_BR
nil
nil
nil
nil
nil
nil
nil
nil
nil
nil
nil
nil
nil

returns nil to everything, except do "LANG"

A quick and dirty solution is set the locale in my compat-5.1 :)

[]'s
- Walter