libkeymap: Do not dump diacr values if lk_dump_keymap called
[platform/upstream/kbd.git] / doc / kbd.FAQ-6.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2 <HTML>
3 <HEAD>
4  <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
5  <TITLE>The Linux keyboard and console HOWTO: The console character sets</TITLE>
6  <LINK HREF="kbd.FAQ-7.html" REL=next>
7  <LINK HREF="kbd.FAQ-5.html" REL=previous>
8  <LINK HREF="kbd.FAQ.html#toc6" REL=contents>
9 </HEAD>
10 <BODY>
11 <A HREF="kbd.FAQ-7.html">Next</A>
12 <A HREF="kbd.FAQ-5.html">Previous</A>
13 <A HREF="kbd.FAQ.html#toc6">Contents</A>
14 <HR>
15 <H2><A NAME="s6">6. The console character sets</A></H2>
16
17 <P>
18 <!--
19 console character sets
20 -->
21
22 <!--
23 character sets, console
24 -->
25 <P>The kernel first tries to figure out what symbol is meant by any given
26 user byte, and next where this symbol is located in the current font.
27 <P>The kernel knows about 5 translations of bytes into console-screen symbols.
28 In Unicode (UTF-8) mode, the UTF-8 code is just converted directly into
29 Unicode. The assumption is that almost all symbols one needs are present
30 in Unicode, and for the cases where this does not hold the codes
31 0xf000-0xf1ff are reserved for direct font access.
32 When not in Unicode mode, one of four translation tables is used.
33 The four tables are: a) Latin1 -&gt; Unicode,  b) VT100 graphics -&gt; Unicode,
34 c) PC -&gt; Unicode, d) user-defined.
35 <P>There are two character sets, called G0 and G1, and one of them
36 is the current character set. (Initially G0.)
37 Typing Ctrl-N causes G1 to become current, Ctrl-O causes G0 to become current.
38 <P>These variables G0 and G1 point at a translation table, and can be changed
39 by the user. Initially they point at tables a) and b), respectively.
40 The sequences ESC ( B and ESC ( 0 and ESC ( U and ESC ( K cause G0 to point
41 at translation table a), b), c) and d), respectively.
42 The sequences ESC ) B and ESC ) 0 and ESC ) U and ESC ) K cause G1 to point
43 at translation table a), b), c) and d), respectively.
44 <P>The sequence ESC c causes a terminal reset, which is what you want if the
45 screen is all garbled. The oft-advised <CODE>echo ^V^O</CODE> will only
46 make G0 current, but there is no guarantee that G0 points at table a).
47 In some distributions there is a program reset(1) that just does
48 <CODE>echo ^[c</CODE>.
49 If your termcap entry for the console is correct (and has an entry
50 <CODE>:rs=\Ec:</CODE>), then also <CODE>setterm -reset</CODE> will work.
51 <P>The user-defined mapping table can be set using mapscrn(8).
52 The result of the mapping is that if a symbol c is printed, the symbol
53 <CODE>s = map[c]</CODE> is sent to the video memory. The bitmap that corresponds to
54 <CODE>s</CODE> is found in the character ROM, and can be changed using setfont(8).
55 <P>
56 <HR>
57 <A HREF="kbd.FAQ-7.html">Next</A>
58 <A HREF="kbd.FAQ-5.html">Previous</A>
59 <A HREF="kbd.FAQ.html#toc6">Contents</A>
60 </BODY>
61 </HTML>