Using nls/locale.alias [ago please comment]

Harold L Hunt II huntharo@msu.edu
Mon Oct 13 02:45:00 GMT 2003


Kensuke Matsuzaki wrote:
> By the way, nls/locale.alias has alias somethig like
> "Arabic_Egypt.1256". Can we use that?
> If so, we no longer need LANG environment variable.

I didn't know that we currently needed the LANG environment variable.  I 
don't really know enough about this stuff to contribute a useful 
suggestion here.  I think I will do whatever you and Alexander think 
will work.  Of course, I am always willing to try something out and 
change it back if it fails for too many people.

Harold

> We can get it following code.
> 
>   char pszCountry[128];
>   char pszLanguage[128];
>   int nAcp = GetACP ();
>   
>   GetLocaleInfo (LOCALE_SYSTEM_DEFAULT, LOCALE_SENGCOUNTRY, pszCountry, 128);
>   GetLocaleInfo (LOCALE_SYSTEM_DEFAULT, LOCALE_SENGLANGUAGE, pszLanguage, 128);
> 
>   printf ("%s_%s.%d\n", pszLanguage, pszCountry, nAcp);
> 
> Kensuke Matsuzaki



More information about the Cygwin-xfree mailing list