Section: User Commands (1)
Updated: luit 1.1.1
luit - Locale and ISO 2022 support for Unicode terminals
is a filter that can be run between an arbitrary application and a
UTF-8 terminal emulator. It will convert application output from the
locale's encoding into UTF-8, and convert terminal input from UTF-8
into the locale's encoding.
An application may also request switching to a different output
encoding using ISO 2022 and ISO 6429 escape sequences. Use of this
feature is discouraged: multilingual applications should be modified
to directly generate UTF-8 instead.
is usually invoked transparently by the terminal emulator. For
information about running
from the command line, see EXAMPLES below.
Display some summary help and quit.
List the supported charsets and encodings, then quit.
Print luit's version and quit.
Function as a simple converter from standard input to standard output.
In startup, establish a handshake between parent and child processes.
This is needed for some systems, e.g., FreeBSD.
Exit as soon as the child dies. This may cause
to lose data at the end of the child's output.
- -argv0 name
Set the child's name (as passed in argv).
- -encoding encoding
rather than the current locale's encoding.
Disable interpretation of single shifts in application output.
Disable interpretation of locking shifts in application output.
Disable interpretation of character set selection sequences in
Disable interpretation of all sequences and pass all sequences in
application output to the terminal unchanged. This may lead to
Generate seven-bit characters for keyboard input.
Disable generation of single-shifts for keyboard input.
Use GL codes after a single shift for keyboard input. By default, GR
codes are generated after a single shift when generating eight-bit
Generate locking shifts (SO/SI) for keyboard input.
- -gl gn
Set the initial assignment of GL. The argument should be one of
The default depends on the locale, but is usually
- -gr gk
Set the initial assignment of GR. The default depends on the locale,
and is usually
except for EUC locales, where it is
- -g0 charset
Set the charset initially selected in G0. The default depends on
the locale, but is usually
- -g1 charset
Set the charset initially selected in G1. The default depends on the
- -g2 charset
Set the charset initially selected in G2. The default depends on the
- -g3 charset
Set the charset initially selected in G3. The default depends on the
- -ilog filename
all the bytes received from the child.
- -olog filename
all the bytes sent to the terminal emulator.
- -alias filename
the locale alias file
End of options.
The most typical use of
is to adapt an instance of
to the locale's encoding. Current versions of
automatically when it is needed. If you are using an older release of
or a different terminal emulator, you may invoke
$ xterm -u8 -e luit
If you are running in a UTF-8 locale but need to access a remote
machine that doesn't support UTF-8,
can adapt the remote output to your terminal:
$ LC_ALL=fr_FR luit ssh legacy-machine
is also useful with applications that hard-wire an encoding that is
different from the one normally used on the system or want to use
legacy escape sequences for multilingual output. In particular,
that do not speak UTF-8 well can use
for multilingual output:
$ luit -encoding 'ISO 8859-1' emacs -nw
And then, in
M-x set-terminal-coding-system RET iso-2022-8bit-ss2 RET
The file mapping locales to locale encodings.
On systems with SVR4 (``Unix-98'') ptys (Linux version 2.2 and later,
should be run as the invoking user.
On systems without SVR4 (``Unix-98'') ptys (notably BSD variants),
as an ordinary user will leave the tty world-writable; this is a
security hole, and luit will generate a warning (but still accept to
run). A possible solution is to make
should drop privileges sufficiently early to make this safe. However,
the startup code has not been exhaustively audited, and the author
takes no responsibility for any resulting security issues.
will refuse to run if it is installed setuid and cannot safely drop
None of this complexity should be necessary. Stateless UTF-8
throughout the system is the way to go.
Charsets with a non-trivial intermediary byte are not yet supported.
Selecting alternate sets of control characters is not supported and
will never be.
Character Code Structure and Extension Techniques (ISO 2022, ECMA-35).
Control Functions for Coded Character Sets (ISO 6429, ECMA-48).
The version of
included in this X.Org Foundation release
was originally written by Juliusz Chroboczek <firstname.lastname@example.org
for the XFree86 Project and includes additional contributions from
Thomas E. Dickey required for newer releases of xterm