1LUIT(1) General Commands Manual LUIT(1)
2
3
4
6 luit - Locale and ISO 2022 support for Unicode terminals
7
9 luit [ options ] [ -- ] [ program [ args ] ]
10
12 Luit is a filter that can be run between an arbitrary application and a
13 UTF-8 terminal emulator. It will convert application output from the
14 locale's encoding into UTF-8, and convert terminal input from UTF-8
15 into the locale's encoding.
16
17 An application may also request switching to a different output encod‐
18 ing using ISO 2022 and ISO 6429 escape sequences. Use of this feature
19 is discouraged: multilingual applications should be modified to
20 directly generate UTF-8 instead.
21
22 Luit is usually invoked transparently by the terminal emulator. For
23 information about running luit from the command line, see EXAMPLES
24 below.
25
27 -h Display some summary help and quit.
28
29 -list List the supported charsets and encodings, then quit.
30
31 -v Be verbose.
32
33 -c Function as a simple converter from standard input to standard
34 output.
35
36 -x Exit as soon as the child dies. This may cause luit to lose
37 data at the end of the child's output.
38
39 -argv0 name
40 Set the child's name (as passed in argv[0]).
41
42 -encoding encoding
43 Set up luit to use encoding rather than the current locale's
44 encoding.
45
46 +oss Disable interpretation of single shifts in application output.
47
48 +ols Disable interpretation of locking shifts in application output.
49
50 +osl Disable interpretation of character set selection sequences in
51 application output.
52
53 +ot Disable interpretation of all sequences and pass all sequences
54 in application output to the terminal unchanged. This may lead
55 to interesting results.
56
57 -k7 Generate seven-bit characters for keyboard input.
58
59 +kss Disable generation of single-shifts for keyboard input.
60
61 +kssgr Use GL codes after a single shift for keyboard input. By
62 default, GR codes are generated after a single shift when gener‐
63 ating eight-bit keyboard input.
64
65 -kls Generate locking shifts (SO/SI) for keyboard input.
66
67 -gl gn Set the initial assignment of GL. The argument should be one of
68 g0, g1, g2 or g3. The default depends on the locale, but is
69 usually g0.
70
71 -gr gk Set the initial assignment of GR. The default depends on the
72 locale, and is usually g2 except for EUC locales, where it is
73 g1.
74
75 -g0 charset
76 Set the charset initially selected in G0. The default depends
77 on the locale, but is usually ASCII.
78
79 -g1 charset
80 Set the charset initially selected in G1. The default depends
81 on the locale.
82
83 -g2 charset
84 Set the charset initially selected in G2. The default depends
85 on the locale.
86
87 -g3 charset
88 Set the charset initially selected in G3. The default depends
89 on the locale.
90
91 -ilog filename
92 Log into filename all the bytes received from the child.
93
94 -olog filename
95 Log into filename all the bytes sent to the terminal emulator.
96
97 -- End of options.
98
100 The most typical use of luit is to adapt an instance of XTerm to the
101 locale's encoding. Current versions of XTerm invoke luit automatically
102 when it is needed. If you are using an older release of XTerm, or a
103 different terminal emulator, you may invoke luit manually:
104
105 $ xterm -u8 -e luit
106
107 If you are running in a UTF-8 locale but need to access a remote
108 machine that doesn't support UTF-8, luit can adapt the remote output to
109 your terminal:
110
111 $ LC_ALL=fr_FR luit ssh legacy-machine
112
113 Luit is also useful with applications that hard-wire an encoding that
114 is different from the one normally used on the system or want to use
115 legacy escape sequences for multilingual output. In particular, ver‐
116 sions of Emacs that do not speak UTF-8 well can use luit for multilin‐
117 gual output:
118
119 $ luit -encoding 'ISO 8859-1' emacs -nw
120
121 And then, in Emacs,
122
123 M-x set-terminal-coding-system RET iso-2022-8bit-ss2 RET
124
126 /usr/lib/X11/fonts/encodings/encodings.dir
127 The system-wide encodings directory.
128
129 /usr/share/X11/locale/locale.alias
130 The file mapping locales to locale encodings.
131
133 On systems with SVR4 (``Unix-98'') ptys (Linux version 2.2 and later,
134 SVR4), luit should be run as the invoking user.
135
136 On systems without SVR4 (``Unix-98'') ptys (notably BSD variants), run‐
137 ning luit as an ordinary user will leave the tty world-writable; this
138 is a security hole, and luit will generate a warning (but still accept
139 to run). A possible solution is to make luit suid root; luit should
140 drop privileges sufficiently early to make this safe. However, the
141 startup code has not been exhaustively audited, and the author takes no
142 responsibility for any resulting security issues.
143
144 Luit will refuse to run if it is installed setuid and cannot safely
145 drop privileges.
146
148 None of this complexity should be necessary. Stateless UTF-8 through‐
149 out the system is the way to go.
150
151 Charsets with a non-trivial intermediary byte are not yet supported.
152
153 Selecting alternate sets of control characters is not supported and
154 will never be.
155
157 xterm(1), unicode(7), utf-8(7), charsets(7). Character Code Structure
158 and Extension Techniques (ISO 2022, ECMA-35). Control Functions for
159 Coded Character Sets (ISO 6429, ECMA-48).
160
162 The version of Luit included in this X.Org Foundation release was orig‐
163 inally written by Juliusz Chroboczek <jch@freedesktop.org> for the
164 XFree86 Project.
165
166
167
168X Version 11 luit 1.0.4 LUIT(1)