Re: JFS default behavior (was: UTF-8 in file systems? xfs/extfs/etc.)

From: Eduard Bloch
Date: Mon Feb 16 2004 - 14:27:05 EST


#include <hallo.h>
* Jamie Lokier [Mon, Feb 16 2004, 02:28:07PM]:

> > > I think this is because the character encoding used by the terminal
> > > should be in the TERM environment variable, but it is in LANG instead.
> >
> > No. TERM does not have anything to do with locales (LANG).
>
> No. The locale should not have anything to do with the appropriate
> byte sequences need to make the terminal display characters.

Heh. It would be very nice if we had the situation that you describe,
but that is actually not the case. TERM specifies the general
capabilities of the terminal. It does _not_ tell the application inside
which FONT encoding is used, nor whether it is compatible with multibyte
input.

> It is wrong that LANG must have a different value depending on whether
> I log in using a DEC VT100 or a Gnome Terminal, even though I wish to
> see exactly the same language, dialect, messages, number formats,
> currency formats, dates and times.

Nonsense, sorry. How should your application know how to encode its
output? How should it know which font is used. I have heard about some
magic strings that application can send to the Xterm (when TERM=xterm)
to tell it to change the font encoding (similar to the string used to
set the window Title used by mc, for example). But this is an extension,
not mandatory for a general implentation of a "terminal".

> It is acceptable that LANG may control the encoding stored in files
> and filenames, but this should be independent of the terminal type.

And what controls the font setting? (see above)

> It is especially wrong that libraries which should be
> locale-independent - such as curses, slang and readline - must read
> the LANG variable in addition to TERM. If curses does not read and

See above. Especially since different chars are used to draw graphical
characters (lines, boxes, ...), they _must_ know which font encoding
they have to expect.

Regards,
Eduard.
--
Zufälle sind die Mittel des Schicksals, durch die es seine wichtigsten
Pläne mit uns durchführt.
-- Charles Tschopp
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/