On Friday 14 December 2001 02.26, Philipp Thomas wrote:
- Francisco Manuel Marzoa Alonso [Wed, 12 Dec 2001 06:39:40 +0100]:
# RC_LC_ALL="es"
First of all, you should *never* have to set LC_ALL. Setting LANG should suffice in most cases. if not explicitly set, all locale categories default to what LANG is set to. You can check this by running 'locale'.
Secondly, "es" isn't a correct locale specifier. It should at least be es_ES. If you want the Euro, it's es_ES@euro, which is just shorthand for es_ES.ISO-8859-15.
Pardon me, but as I jump in late, could you please explain why you think you need to set LC_ALL?
Philipp
I wrote a small program to test all this, and here's what I discovered. Comments are appreciated. <code localetest.c> #include <stdio.h> #include <locale.h> #include <X11/Xlib.h> int main(int argc, char *argv[]){ char *locale; locale[0] = '\0'; setlocale(LC_ALL, ""); locale = setlocale(LC_ALL, NULL); if(!setlocale(LC_ALL, locale)){ printf("There seems to be a problem\n"); exit(1); } if(!XSupportsLocale()){ printf("This X server doesn't support the current locale\n"); exit(1); } printf("The locale is supported in X\n"); printf("Locale is %s\n", (locale == NULL?"unset":locale)); return 0; } </code> oki, with all LC variables unset, and using LANG == "en_GB", running localetest gives The locale is supported in X Locale is en_GB with all LC vars unset, but with LANG == "en_GB@euro", it gives andjoh@samantha:~> ./localetest This X server doesn't support the current locale removing the X support test, and just seeing what the locale setting is, gives Locale is LC_CTYPE=en_GB@euro;LC_NUMERIC=en_GB@euro;LC_TIME=en_GB@euro; LC_COLLATE=C;LC_MONETARY=en_GB@euro;LC_MESSAGES=en_GB@euro; LC_PAPER=en_GB@euro;LC_NAME=en_GB@euro;LC_ADDRESS=en_GB@euro; LC_TELEPHONE=en_GB@euro;LC_MEASUREMENT=en_GB@euro; LC_IDENTIFICATION=en_GB@euro (in one string. Here broken into separate lines). As opposed to the plain "Locale i en_GB" in the other case. It looks to me like the euro support is broken. Hm. //Anders