[EMAIL PROTECTED] wrote on 2001-02-15 12:43 UTC:
> 2) Don't use ESC ( K.
> That makes the use of fonts with embedded Unicode glyph maps
> impossible, unless you put the console into UTF-8 mode.
Definitely never use "ESC ( K" for any other purpose than activating the
German variant of 7-bit ASCII in the G0 set! Because that is what this
ESC sequence is internationally standardized to do according to ISO 2022
and used for this purpose in numerous early 1980s VT100 compatible video
terminals in Germany.
What's wrong with activating UTF-8 via the ISO standardized and widely
implemented "ESC % G"? That works not only on the console, but it also
gives you access to all the desired characters on many other terminal
emulators (recent Kermit version for instance) in a compatible way that
will be used more frequently in the future.
The fine print for the ESC sequence lawyers:
According to ISO/IEC 2022:1994 =
ftp://ftp.ecma.ch/ecma-st/Ecma-035.pdf
the control sequence "ESC ( K" is an example of a "G0-DESIGNATE 94-SET"
control function.
A look into the "ISO International Register of Coded Character Sets" on
http://www.itscj.ipsj.or.jp/ISO-IR/
leads us to the official meaning of "ESC ( K" = "ESC 02/08 04/11":
http://www.itscj.ipsj.or.jp/ISO-IR/021.pdf
This sequence was registered on 1975-12-01 to switch G0 to represent
"ISO 646, German Version DIN 66083".
I don't think that is the meaning that "ESC ( K" has in the well stirred
escape soup that we call the Linux console driver, because "man console_codes"
says:
ESC ( K Select user mapping - the map that is loaded by
the utility mapscrn(8).
There are lots of other conflicts like this.
What should be done here:
Go through all the ESC sequences in the console driver and check,
whether they are within one of the sequence subspaces reserved for ISO
2022 without implementing the corresponding ISO 2022 semantics.
Introduce new proper private ISO 2022 ESC sequences for these functions and
declare the conflicting old ones to be obsolete in "man console_codes".
ISO 2022 private control functions have the forms "ESC Fp and ESC 02/03
.. Fp", where "the notation Fp indicates a bit combination in the range
03/00 to 03/ 15". There are also more specific private functions for
things like certain G0/G1 mappings, etc. Unfortunately whoever
introduced "ESC ( U", "ESC ( K", etc. didn't know about these either.
Linux has at the moment the following ISO 2022 G0/G1 designation
sequences implemented:
ESC ( Start sequence defining G0 character set
ESC ( B Select default (ISO 8859-1 mapping)
ESC ( 0 Select vt100 graphics mapping
ESC ( U Select null mapping - straight to character ROM
ESC ( K Select user mapping - the map that is loaded by
the utility mapscrn(8).
ESC ) Start sequence defining G1
(followed by one of B, 0, U, K, as above).
According to the International Register:
ESC ( B G0 = ISO 646, USA Version X3.4 - 1968
http://www.itscj.ipsj.or.jp/ISO-IR/006.pdf
ESC - A G1 = Upper/right half of ISO 8859-1
http://www.itscj.ipsj.or.jp/ISO-IR/100.pdf
G0/G1 allocation sequences with a finale byte from column 3 (ASCII
digits, etc.) is a private sequence outside the scope of the ISO 2375
registry. That's where things like the VT100 mapping belong to. Since
"ESC ( U" and "ESC ( K" seem to be used for mapping not 94 or 96
characters sets, what should be used here is really a private control
sequence of the form "ESC Fp" or "ESC # ... Fp", where Fp is again a
digit or other character from column three of ASCII.
Markus
--
Markus G. Kuhn, Computer Laboratory, University of Cambridge, UK
Email: mkuhn at acm.org, WWW: <http://www.cl.cam.ac.uk/~mgk25/>
-
Linux-UTF8: i18n of Linux on all levels
Archive: http://mail.nl.linux.org/lists/