[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Native unicode support?
- From: Björn De Meyer <bjorn.demeyer@...>
- Date: Tue, 25 Jun 2002 20:44:05 +0200
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".
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." --
Björn De Meyer