lua-users home
lua-l archive

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


Luiz Henrique de Figueiredo wrote:
> 
> That depends on the current locale. Try setting a Korean locale.
> Seeting a Portuguese locale allows identifiers with accents, such as "número".
> --lhf

Yes, I figured that out now. However, then it would help if there
was a setlocale() call somewhere in lua.c (and in luac.c). AFAICS,
and as far as I can "grep" it's lacking. These two programs 
should use a call setlocale(LC_ALL,getenv("LANG")) in order to 
make them support the current active character set on a PC.

Of course, that doesn't solve the problem of portability.
On certain OS'es end systems several (or almost all) locales may be 
missing which will make setlocale() fail. Scripts may be unportable 
between different locales. I can see why you would say "then don't 
do that then", but still... It might be interesting to have a kind of
lua_isalpha() that is locale-neutral to address these problems. 
  


-- 
"No one knows true heroes, for they speak not of their greatness." -- 
Daniel Remar.
Björn De Meyer 
bjorn.demeyer@pandora.be