LANG, LC_ALL etc under Win98

Max A. Fomitchev vince@molot.ru
Thu Nov 18 03:08:00 GMT 1999


How I can set the value of the following variables: LANG, LC_ALL etc?
It's quite easy in any UNIX environment, but I can't do it under Win98.

For example, I wrote the following trivial program:

//file1.c
#include <stdio.h>
#include <locale.h>
#include <ctype.h>

main()
{
    unsigned char c=0x0f9;
    setlocale(LC_ALL, "");
    printf("LC_CTYPE\t= %s\n", setlocale(LC_CTYPE, NULL));
    printf("isalpha(%c)\t= %s\n", c, isalpha(c) ? "yes" : "no" );
    return 0;
}
//end

LANG="ru_SU.X-CP-866" (or any other - WIN1251, KOI8-r, ISO8859-5)
LC_ALL=ru

Result of the execution was:

BASH.EXE-2.02$ ./file1
LC_CTYPE        	= C
isalpha(<Russian 'e'>)	= no

I've tried to set LANG and other environment variables in AUTOEXEC.BAT, 
but it doesn't take effect.

Max Fomitchev

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com



More information about the Cygwin mailing list