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

testlocale (was Re: Perl warning in apt-get operations...)

* Colin Watson (cjwatson@debian.org) wrote:
> The environment variable setting 'LANG=en.ISO8859-1' isn't valid. Try
> 'LANG=en_US.ISO-8859-1' instead; it might be in your shell startup
> scripts or something.
> Here's a quick way to tell if a locale is valid (although of course you
> could just run perl, too :)):
>   [colinw@kypris ~]$ cat testlocale.c
>   #include <stdio.h>
>   #include <locale.h>
>   int main() {
>           printf ("%s\n", setlocale (LC_ALL, ""));
>           return 0;
>   }
>   [colinw@kypris ~]$ make testlocale
>   cc     testlocale.c   -o testlocale
>   [colinw@kypris ~]$ ./testlocale 
>   C
>   [colinw@kypris ~]$ LC_ALL=en.ISO8859-1 ./testlocale
>   (null)
>   [colinw@kypris ~]$ LC_ALL=en_US.ISO-8859-1 ./testlocale
>   en_US.ISO-8859-1
> -- 
> Colin Watson                                  [cjwatson@flatline.org.uk]

Hi Colin.

I've just stumbled into this thread, and have a tangental question.  If I
want to be able to see other characters (ie. German umlauts, etc.) what
needs to be done here?

I was able to do the test you've outlined above, and I got all the same
results as you did.  Now what?  Is this supposed to be set in my:
or where?  Could you please enlighten me as to the syntax of the file in


Mike Pfleger

There's seventy brilliant people on earth.
Where are they hiding?
"Yashar" -Cabaret Voltaire (off of "2x45")

Reply to: