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

Seeing clarification for locale names



[Please Cc: me on replies, I am not subscribed to Debian-glibc]

Hi,

I am a bit confused about locale names. In literature, one can see that
a proper locale name is, for example, en_US.UTF-8. This is also what I
write in /etc/locale.gen to have one locale "generated" on my system.

locale -a, however, will print en_US.utf8. I _think_ this is the
intended behavior since there is a normalizing function somewhere in the
glibc sources which lowercases everything and thows out all
interpunction.

Otoh, there are applications that will malfuntion or print a warning if
the locale isn't explicitly set to .UTF-8 (upper case, hyphen).

In my shell profile scripts, I have code that will check whether the
intended locale is actually present on the local system by comparing to
locale -a's output (avoiding a fallback to a non-UTF-8 locale not
knowing about German umlauts if one is available). Hence, my locale
environment variables are all set to the respective .utf8 suffix since
that's what locale -a will print. Is this a wrong approach?

I would appreciate pointers to documentation, personal opinions, war
stories, encoding tales, historic lectures, anything that might
enlighten me and help me build the knowlegde and understanding about
UNIX locales are supposed to work in Debian GNU/Linux. Thank you in
advance!

Greetings
Ma 'Schei? Encoding!' rc

-- 
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany    |  lose things."    Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature |  How to make an American Quilt | Fax: *49 6224 1600421


Reply to: