<<< Date Index >>>     <<< Thread Index >>>

Re: Reading UTF-8 Mail



 On Friday, May 5, 2006 at 15:24:59 -0400, Kyle Wheeler wrote:

> [Debian] /etc/locale-gen contains en_US.UTF-8, and when I run
> locale-gen, it prints out en_US.UTF-8 as being generated, but when I
> do "locale -a", it prints out en_US.utf8. No idea why.

    The localedef command (the low-level Glibc utility generating the
locales) does munge the target name by default, unless the target name
is given with path. As example let's say you want to generate an
en_US.CP-1252 locale (to make work a terminal with both whole Latin-1
and whole Latin-9, and Kurly quotes, without going the UTF-8 way).

| # localedef -i en_US -f CP1252 en_US.CP-1252

    This creates a munged en_US.cp1252/ in the default locale directory
/usr/lib/locale/

| $ localedef -i en_US -f CP1252 /tmp/en_US.CP-1252

    While this creates a verbatim en_US.CP-1252/ in /tmp/. And yes,
exporting LANG=/tmp/en_US.CP-1252 does work (some more tweaking might be
necessary for "locale charmap" though).


Bye!    Alain.
-- 
« Be liberal in what you accept, and conservative in what you send. »
        Jon Postel / Robustness Principle / RFC 1122