Linux "luit" Command Line Options and Examples
Locale and ISO 2022 support for Unicode terminals

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.


Usage:

luit [ options ] [ -- ] [ program [ args ] ]




Command Line Options:

-h
Display some summary help and quit.
luit -h ...
-list
List the supported charsets and encodings, then quit.
luit -list ...
-V
Print luit's version and quit.
luit -V ...
-c
Function as a simple converter from standard input to standard output.
luit -c ...
-p
establish a handshake between parent and child processes. This is needed for some systems e.g. FreeBSD
luit -p ...
-x
Exit as soon as the child dies. This may cause luit to lose data at the end of the child's output.
luit -x ...
-argv0
Set the child's name (as passed in argv[0]).
luit -argv0 ...
-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.+ot Disable interpretation of all sequences and pass all sequences in application output to the terminal unchanged. This may leadto interesting results.
luit -encoding ...
-k7
+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 generatingeight-bit keyboard input.
luit -k7 ...
-kls
Generate locking shifts (SO/SI) for keyboard input.
luit -kls ...
-g0
Set the charset initially selected in G0. The default depends on the locale, but is usually ASCII.
luit -g0 ...
-g1
Set the charset initially selected in G1. The default depends on the locale.
luit -g1 ...
-g2
Set the charset initially selected in G2. The default depends on the locale.
luit -g2 ...
-g3
Set the charset initially selected in G3. The default depends on the locale.
luit -g3 ...
-ilog
Log into filename all the bytes received from the child.
luit -ilog ...
-olog
Log into filename all the bytes sent to the terminal emulator.
luit -olog ...
-alias
the locale alias file(default: /usr/share/X11/locale/locale.alias).
luit -alias ...
--
EXAMPLESThe most typical use of luit is to adapt an instance of XTerm to the locale's encoding. Current versions of XTerm invoke luit auto‐matically when it is needed. If you are using an older release of XTerm, or a different terminal emulator, you may invoke luit manu‐ally:$ xterm -u8 -e luitIf 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 outputto your terminal:$ LC_ALL=fr_FR luit ssh legacy-machineLuit is also useful with applications that hard-wire an encoding that is different from the one normally used on the system or wantto use legacy escape sequences for multilingual output. In particular, versions of Emacs that do not speak UTF-8 well can use luitfor multilingual output:$ luit -encoding 'ISO 8859-1' emacs -nwAnd then, in Emacs,
luit -- ...