|LUIT(1)||General Commands Manual||LUIT(1)|
luit - Locale and ISO 2022 support for Unicode terminals
luit [ options ] [ -- ] [ program [ args ] ]
Luit 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.
Luit is usually invoked transparently by the terminal emulator. For information about running luit from the command line, see EXAMPLES below.
The most typical use of luit is to adapt an instance of XTerm to the locale's encoding. Current versions of XTerm invoke luit automatically when it is needed. If you are using an older release of XTerm, or a different terminal emulator, you may invoke luit manually:
If you are running in a UTF-8 locale but need to access a remote machine that doesn't support UTF-8, luit can adapt the remote output to your terminal:
Luit 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, versions of Emacs that do not speak UTF-8 well can use luit for multilingual output:
And then, in Emacs,
On systems with SVR4 (“Unix-98”) ptys (Linux version 2.2 and later, SVR4), luit should be run as the invoking user.
On systems without SVR4 (“Unix-98”) ptys (notably BSD variants), running luit 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 luit suid root; luit 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.
Luit will refuse to run if it is installed setuid and cannot safely drop privileges.
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.
xterm(1), unicode(7), utf-8(7), charsets(7).
Character Code Structure and Extension Techniques (ISO 2022, ECMA-35).
Control Functions for Coded Character Sets (ISO 6429, ECMA-48).
The version of Luit included in this X.Org Foundation release was originally written by Juliusz Chroboczek <email@example.com> for the XFree86 Project and includes additional contributions from Thomas E. Dickey required for newer releases of xterm(1).
|luit 1.1.1||X Version 11|