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