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

Re: non-ASCII characters in /etc/locales.alias ?



On Thu, Jan 17, 2002 at 04:43:12PM +0000, Alastair McKinstry wrote:
> > > (1) in /etc/locale.alias, we start with the line
> > > 
> > > # -*- coding: iso-8859-1 -* 
> > > # Locale database

This is an emacsism; I wouldn't want to see it spread around /etc.

Also, that implies to users that, if they recode this file and change
that line, they don't break anything.  All it really does is hint some
editors of the encoding.

I'd rather see it stay ASCII and move it to UTF-8 later than introduce
this.

> > I propose this to included into /usr/share/doc/locales/examples/
> > directory.  The default /etc/locale.alias should be ASCII only,
> > though I agree some people will need compatibility to non-
> > internationalized (i.e., ISO-8859-1 in /etc/locale.alias)
> > systems.  I think such people will need to read some documents
> > (manpages OK, README.Debian OK, any others OK) and set up their
> > /etc/locale.alias .
> >
> ? Can you explain a bit more?
> The point of doing it this way is to not break existing compatability;
> the -*- hint will be ignored where not understood (as I understand it 
> it would fix the 8-bit editing problem in JP: emacs would just open
> the file in ISO-8859 mode.

cat /etc/locale.alias

doesn't and can't support that tag.  Since I'm on a UTF-8 terminal, I
see garbage in those aliases.  This shouldn't happen in system-supplied
textual configuration files.

Not everyone uses Emacs. (Especially as a dropin for /bin/cat. :)

> you could do 
> setenv LC_ALL=$'\x66\x72\x61\x6e\xe7\x61\x69\x73'
> to set to francais (latin1  encoding) while in UTF-8 mode.

If people actually do something like that, and it stops working, they've
earned it in spades.  :)

> > I propose that ISO-8859-1 version of /etc/locale.alias to be
> > prepared in /usr/share/doc/locales/examples/ directory.  The
> > manpage can have an instruction how to use the file.  The 
> > default /etc/locale.alias should not contain ISO-8859-1 locale
> > names.

I wouldn't want to encourage ISO-8859-1 in it at all, so I'd rather not
see that.  Examples should show *good* usage; this would be a poor
example.

> BTW, in the bug shown above,
> LC_ALL=en_US.utf8 locale -a
> 
> how should we show "fran?ais", or should we show it at all? if we
> transliterate it to utf-8, it will preserve correctly, but not 

Transcode, recode, convert; transliterate is something else.

> (locale code expecting the latin1 variant). I propose we don't show it.

The program (or underlying libraries) could reasonably parse /etc/aliases as
ASCII; if any conversions are done, that would probably just return
error.

By the way,

01:45pm glenn@zewt.pts/0 [~] iconv -f ascii -t utf-8 < /etc/locale.alias
...
bokmal          no_NO.ISO-8859-1
bokmiconv: illegal input sequence at position 1319

That shouldn't happen with textfiles in /etc.

-- 
Glenn Maynard



Reply to: