Software: Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.12 with Suhosin-Patch mod_ssl/2.2.8 OpenSSL/0.9.8g. PHP/5.2.4-2ubuntu5.12 uname -a: Linux forum.circlefusion.com 2.6.24-19-server #1 SMP Wed Jun 18 15:18:00 UTC 2008 i686 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /usr/share/doc/console-tools/html/ drwxr-xr-x |
Viewing file: lct-6.html (9.08 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) | 6. Understanding and setting up the screen driver6.1 Unicode is everywhereScreen Font MapsIn recent (as of 1998/08/11) kernels, the screen driver is based on 16-bit unicode (UCS2) encoding, which means that every console-font loaded should be defined using a unicode Screen Font Map (SFM for short), which tells, for each character in the font, the list of UCS2 characters it will render. SFM's were formerly called ``Unicode Map'', or ``unimap'' for short, but this term should be dropped, as now what they called ``screen maps'' uses Unicode as well: it probably confuses many many people SFM Fallback tablesStarting with release 1997.11.13 of the Linux Console Tools, A fallback-table file is made of fallback entries, each entry being on
its own line. Empty lines, and lines beginning with the A fallback entry is a series of 2 or more UCS2 codes. The first one is the character for which we want a glyph; the following ones are those whose glyph we want to use when no glyph designed specially for our character is available. The order of the codes defines a priority order (own glyph if available, then second char's, then the third's, etc.) If a SFM was to be loaded, fallback mappings are added to this map
before it is loaded. If there was not (ie. a font without SFM was
loaded, and no Note that each fallback entry is checked against the original SFM, not
against the SFM we get by adding former fallback entries to the
original SFM (the one read from a file, or given by the kernel); this
applies even to entries in different files, and thus the order of
6.2 The unicode screen-modeThere are basically 2 screen-modes (byte mode and UTF mode). The simpler to explain is the UTF mode, in which the bytes received from the application (ie. written to the console screen) are interpreted as UTF8 sequences, which are converted in the equivalent UCS2 codes, and then looked-up in the SFM to determine the glyphs used to display each character. Switching to and from UTF mode is done by sending to the screen the
escape sequences Use 6.3 The byte screen-modeThe byte mode is a bit more complicated, as it uses an additional map to transform the byte-characters sent by the application into UCS2 characters, which are then treated as told above. This map I call the Application Charset Map (ACM), because it defines the encoding the application uses, but it used to be called a ``screen map'', or ``console map'' (this comes from the time where the screen driver didn't use Unicode, and there was only one Map down there). Although there is only one ACM active at a given time, there are 4 of them at any time in the kernel; 3 of them are built-in and never change, and they define the ISO latin1 charset, the DEC VT100 charset, and the IBM codepage 437; the 4th is user-definable, and defaults on boot to the ``straight to font'' mapping, decribed below under ``Special UCS2 codes''. The Charset slotsThe Linux Console Driver has 2 slots for charsets, labeled G0 and
G1. Each of these slots contains a reference to one of the 4
kernel ACMs, 3 of which are predefined to provide the cp437,
iso01, and vt100 graphics charsets. The 4th one is
user-definable; this is the one you can set with Versions of the Linux Console Tools prior to 1998.08.11, as well as all versions of
You will note that, although each VT has its own slot settings, there is only one user-defined ACM for use by all the VTs. That is, whereas you can have tty1 using G0=cp437 and G1=vt100, at the same time as tty2 using G0=iso01 and G1=iso02 (user-defined), you cannot have at the same time tty1 using iso02 and tty2 using iso03. This is a limitation of the linux kernel. Note that you can emulate such a setting using the You'll find filterm in the konwert package, by Marcin Kowalczyk, which is available from his WWW site. 6.4 Special UCS2 codesThere are special UCS2 values you should care about, but the present list is probably not exhaustive:
6.5 About the old 8-bit ``screen maps''There was a time where the kernel didn't know anything about Unicode. In this ancient time, Application Charset Maps were called ``screen maps'', and just mapped the application's characters into font positions. The file format used for these 8bit ACM's is still supported for backward compatibility, but should not be used any more. The old way of using custom ACM's didn't know about unicode, so the
ACM had to depend on the font. Now, as each VT chooses its own ACM
(from the 4 ones in the kernel at a given time), and as the
console-font is common to all VT's, we can use a charset even if the
font can't display all of its characters; it will then display the
replacement character ( 6.6 See also
Next Previous Contents |
:: Command execute :: | |
--[ c99shell v.2.1 [PHP 7 Update] [1.12.2019] maintained by KaizenLouie and updated by cermmik | C99Shell Github (MySQL update) | Generation time: 0.0045 ]-- |