LUIT(1) UNIX Programmer's 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 appli- cation 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 emula- tor. For information about running luit from the command line, see EXAMPLES below.
-h Display some summary help and quit. -list List the supported charsets and encodings, then quit. -v Be verbose. -c Function as a simple converter from standard input to standard output. -x Exit as soon as the child dies. This may cause luit to loose data at the end of the child's output. -argv0 name Set the child's name (as passed in argv). -encoding encoding Set up luit to use encoding rather than the current locale's encoding. +oss Disable interpretation of single shifts in application output. +ols Disable interpretation of locking shifts in application output. +osl Disable interpretation of character set selection sequences in application output. XFree86 Version 4.5.0 1 LUIT(1) UNIX Programmer's Manual LUIT(1) +ot Disable interpretation of all sequences and pass all sequences in application output to the terminal unchanged. This may lead to interesting results. -k7 Generate seven-bit characters for keyboard input. +kss Disable generation of single-shifts for keyboard input. +kssgr Use GL codes after a single shift for keyboard input. By default, GR codes are generated after a single shift when generating eight-bit keyboard input. -kls Generate locking shifts (SO/SI) for keyboard input. -gl gn Set the initial assignment of GL. The argument should be one of g0, g1, g2 or g3. The default depends on the locale, but is usually g0. -gr gk Set the initial assignment of GR. The default depends on the locale, and is usually g2 except for EUC locales, where it is g1. -g0 charset Set the charset initially selected in G0. The default depends on the locale, but is usually ASCII. -g1 charset Set the charset initially selected in G1. The default depends on the locale. -g2 charset Set the charset initially selected in G2. The default depends on the locale. -g3 charset Set the charset initially selected in G3. The default depends on the locale. -ilog filename Log into filename all the bytes received from the child. -olog filename Log into filename all the bytes sent to the terminal emulator. -- End of options. XFree86 Version 4.5.0 2 LUIT(1) UNIX Programmer's Manual LUIT(1)
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: $ 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, luit can adapt the remote output to your terminal: $ LC_ALL=fr_FR luit ssh legacy-machine 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 multil- ingual output. In particular, versions of Emacs that do not speak UTF-8 well can use luit for multilingual output: $ luit -encoding 'ISO 8859-1' emacs -nw And then, in Emacs, M-x set-terminal-coding-system RET iso-2022-8bit-ss2 RET
/usr/X11R6/lib/X11/fonts/encodings/encodings.dir The system-wide encodings directory. /usr/X11R6/lib/X11/locale/locale.alias The file mapping locales to locale encodings.
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. XFree86 Version 4.5.0 3 LUIT(1) UNIX Programmer's Manual LUIT(1)
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 sup- ported and will never be.
xterm(1), unicode(7), utf-8(7), charsets(7). Character Code Structure and Extension Techniques Control Functions for Coded Character Sets
Luit was written by Juliusz Chroboczek <email@example.com> for the XFree86 project. XFree86 Version 4.5.0 4
Generated on 2016-04-09 18:24:16 by $MirOS: src/scripts/roff2htm,v 1.83 2016/03/26 23:38:28 tg Exp $
These manual pages and other documentation are copyrighted by their respective writers;
their source is available at our CVSweb,
AnonCVS, and other mirrors. The rest is Copyright © 2002–2016 The MirOS Project, Germany.
This product includes material provided by mirabilos.
This manual page’s HTML representation is supposed to be valid XHTML/1.1; if not, please send a bug report – diffs preferred.