bug-glibc
[Top][All Lists]
Advanced

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

Re: non-ASCII characters in locale.alias file


From: Tomohiro KUBOTA
Subject: Re: non-ASCII characters in locale.alias file
Date: Wed, 23 Jan 2002 08:07:24 +0900
User-agent: Wanderlust/2.8.1 (Something) SEMI/1.14.3 (Ushinoya) FLIM/1.14.3 (Unebigoryƍmae) APEL/10.3 Emacs/20.7 (i386-debian-linux-gnu) MULE/4.1 (AOI)

Hi,

At 22 Jan 2002 09:46:39 -0800,
Ulrich Drepper wrote:

> Tomohiro KUBOTA <address@hidden> writes:
> 
> > I think usage of non-ASCII characters here is invalid.
> > (In future, we may or may not use UTF-8).
> 
> No, why?  The file is never read with the wide string functions which
> would require it to be encoded in one specific charset.  It is simply
> a sequence of bytes with fields separated by white spaces.  As long as
> none of the non-ASCII characters uses white spaces (and no used
> charset violates this rules or else it couldn't be used here) this
> work just fine.  These sequences of bytes are then compared with the
> content of environment variables.  No need for restrictions.

LANG=foobar must be written well in every locales which glibc supports.
I.e., I should be able to change locale into "fran?ais" from, for
example, UTF-8 or EUC-JP locales.  This is impossible because I
cannot write the problematic 8bit byte sequence in UTF-8 or EUC-JP
locales.

And, though the locale string is mere byte sequence from the viewpoint
of computer, it is designed to be resemble to human word, i.e., the
string is intended to be regarded as ISO-8859-1 (or some other ISO-8859
series with same character in the codepoint).  If locale.alias file
were really intended to be mere byte sequence without any meaning for
human, it would be regarded as a binary file, not a text file.  This
is not true, or at least, it is a bad idea.

One realistic problem is that /etc/locale.alias cannot be edited in 
UTF-8 or EUC-JP locales.

---
Tomohiro KUBOTA <address@hidden>
http://www.debian.or.jp/~kubota/
"Introduction to I18N"  http://www.debian.org/doc/manuals/intro-i18n/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]