This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

LANG, LC_ALL etc under Win98


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]