lua-users home
lua-l archive

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


Eric Tetz wrote:
> 
> Unless you add it yourself, there is no LANG variable in the environment 
> on DOS or Windows machines.
> 

Right again. Make it 

char *loc;
loc = getenv("LANG"); /* Returns NULL if not found. */
setlocale(LC_ALL, (loc ? loc : "C" ));

AFAIK, "C" locale is completely portable.

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