luit Command

Purpose

Supports locale and ISO 2022 for Unicode terminals.

Syntax

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

Description

The luit command is a filter that runs between an arbitrary application and a UTF-8 terminal emulator. The luit command converts application output from the locale’s encoding into UTF-8, and converts terminal input from UTF-8 into the locale’s encoding.

Note: Multilingual applications must be set to generate only the UTF-8 code. You must not use the command to use different output other than UTF-8.

The luit command is invoked transparently by the terminal emulator. For information on running the luit command from the command line, see Examples.

Options

Item Description
-h Displays the help summary.
-list Lists the supported charsets and encodings.
-v Verbose.
-c Converts the standard input to standard output.
-x Exits as soon as the child function dies. This might cause the luit command to loose data at the end of the output of the child function.
-argv0 name Sets the name of the child that is passed along with the argv[0] command.
-encoding encoding Specifies that the luit command use encoding rather than the current locale encoding.
+oss Disables interpretation of single shifts in the application output.
+ols Disables interpretation of locking shifts in the application output.
+osl Disables interpretation of character set selection sequences in the application output.
+ot Disables interpretation of all sequences and passes all sequences in the application output to the terminal unchanged.
-k7 Generates 7-bit characters for keyboard input.
+kss Disables generation of single-shifts for keyboard input.
+kssgr Uses GL codes after a single shift for keyboard input. By default, GR codes are generated after a single shift when generating 8-bit keyboard input.
-kls Generates locking shifts (SO/SI) for keyboard input.
-gl gn Sets the initial assignment of GL. The argument must be one of g0, g1, g2, or g3. The default value depends on the locale, and is usually g0.
-gr gk Sets the initial assignment of GR. The default value depends on the locale, and is usually g2 except for EUC locales, where it is g1.
-g0 charset Sets the value of charset that is initially selected in G0. The default value depends on the locale, but is usually ASCII.
-g1 charset Sets the value of charset that is initially selected in G1. The default value depends on the locale.
-g2 charset Sets the value of charset that is initially selected in G2. The default value depends on the locale.
-g3 charset Sets the value of charset that is initially selected in G3. The default value depends on the locale.
-ilog filename Logs all the bytes received from the child into filename.
-olog filename Logs all the bytes sent to the terminal emulator into filename.

Examples

  1. To adapt an instance of XTerm to the locale's encoding, current versions of XTerm invoke the luit command automatically when it is needed. If you are using an older release of XTerm, or a different terminal emulator, you can invoke the luit command manually:
    $ xterm -u8 -e luit
  2. If you are running in a UTF-8 locale but need to access a remote machine that does not support UTF-8, the luit command can adapt the remote output to your terminal:
    $ LC_ALL=fr_FR luit ssh legacy-machine

Files

Item Description
/usr/lib/X11/fonts/encodings/encodings.dir Contains the system-wide encoding directory.
/usr/lib/X11/locale/locale.alias Contains the file mapping locales to locale encoding.