372 lines
8.1 KiB
HTML
372 lines
8.1 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of LUIT</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>LUIT</H1>
|
|
Section: User Commands (1)<BR>Updated: luit 1.1.1<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
luit - Locale and ISO 2022 support for Unicode terminals
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>luit</B>
|
|
|
|
[
|
|
<I>options</I>
|
|
|
|
] [
|
|
<B>--</B>
|
|
|
|
] [
|
|
<I>program</I>
|
|
|
|
[
|
|
<I>args</I>
|
|
|
|
] ]
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<B>Luit</B>
|
|
|
|
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.
|
|
<P>
|
|
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.
|
|
<P>
|
|
<B>Luit</B>
|
|
|
|
is usually invoked transparently by the terminal emulator. For
|
|
information about running
|
|
<B>luit</B>
|
|
|
|
from the command line, see EXAMPLES below.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="1"><B>-h</B>
|
|
|
|
<DD>
|
|
Display some summary help and quit.
|
|
<DT id="2"><B>-list</B>
|
|
|
|
<DD>
|
|
List the supported charsets and encodings, then quit.
|
|
<DT id="3"><B>-V</B>
|
|
|
|
<DD>
|
|
Print luit's version and quit.
|
|
<DT id="4"><B>-v</B>
|
|
|
|
<DD>
|
|
Be verbose.
|
|
<DT id="5"><B>-c</B>
|
|
|
|
<DD>
|
|
Function as a simple converter from standard input to standard output.
|
|
<DT id="6"><B>-p</B>
|
|
|
|
<DD>
|
|
In startup, establish a handshake between parent and child processes.
|
|
This is needed for some systems, e.g., FreeBSD.
|
|
<DT id="7"><B>-x</B>
|
|
|
|
<DD>
|
|
Exit as soon as the child dies. This may cause
|
|
<B>luit</B>
|
|
|
|
to lose data at the end of the child's output.
|
|
<DT id="8"><B>-argv0</B><I> name</I>
|
|
|
|
<DD>
|
|
Set the child's name (as passed in argv[0]).
|
|
<DT id="9"><B>-encoding</B><I> encoding</I>
|
|
|
|
<DD>
|
|
Set up
|
|
<B>luit</B>
|
|
|
|
to use
|
|
<I>encoding</I>
|
|
|
|
rather than the current locale's encoding.
|
|
<DT id="10"><B>+oss</B>
|
|
|
|
<DD>
|
|
Disable interpretation of single shifts in application output.
|
|
<DT id="11"><B>+ols</B>
|
|
|
|
<DD>
|
|
Disable interpretation of locking shifts in application output.
|
|
<DT id="12"><B>+osl</B>
|
|
|
|
<DD>
|
|
Disable interpretation of character set selection sequences in
|
|
application output.
|
|
<DT id="13"><B>+ot</B>
|
|
|
|
<DD>
|
|
Disable interpretation of all sequences and pass all sequences in
|
|
application output to the terminal unchanged. This may lead to
|
|
interesting results.
|
|
<DT id="14"><B>-k7</B>
|
|
|
|
<DD>
|
|
Generate seven-bit characters for keyboard input.
|
|
<DT id="15"><B>+kss</B>
|
|
|
|
<DD>
|
|
Disable generation of single-shifts for keyboard input.
|
|
<DT id="16"><B>+kssgr</B>
|
|
|
|
<DD>
|
|
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.
|
|
<DT id="17"><B>-kls</B>
|
|
|
|
<DD>
|
|
Generate locking shifts (SO/SI) for keyboard input.
|
|
<DT id="18"><B>-gl</B><I> gn</I>
|
|
|
|
<DD>
|
|
Set the initial assignment of GL. The argument should be one of
|
|
<B>g0</B>,
|
|
|
|
<B>g1</B>,
|
|
|
|
<B>g2</B>
|
|
|
|
or
|
|
<B>g3</B>.
|
|
|
|
The default depends on the locale, but is usually
|
|
<B>g0</B>.
|
|
|
|
<DT id="19"><B>-gr</B><I> gk</I>
|
|
|
|
<DD>
|
|
Set the initial assignment of GR. The default depends on the locale,
|
|
and is usually
|
|
<B>g2</B>
|
|
|
|
except for EUC locales, where it is
|
|
<B>g1</B>.
|
|
|
|
<DT id="20"><B>-g0</B><I> charset</I>
|
|
|
|
<DD>
|
|
Set the charset initially selected in G0. The default depends on
|
|
the locale, but is usually
|
|
<B>ASCII</B>.
|
|
|
|
<DT id="21"><B>-g1</B><I> charset</I>
|
|
|
|
<DD>
|
|
Set the charset initially selected in G1. The default depends on the
|
|
locale.
|
|
<DT id="22"><B>-g2</B><I> charset</I>
|
|
|
|
<DD>
|
|
Set the charset initially selected in G2. The default depends on the
|
|
locale.
|
|
<DT id="23"><B>-g3</B><I> charset</I>
|
|
|
|
<DD>
|
|
Set the charset initially selected in G3. The default depends on the
|
|
locale.
|
|
<DT id="24"><B>-ilog</B><I> filename</I>
|
|
|
|
<DD>
|
|
Log into
|
|
<I>filename</I>
|
|
|
|
all the bytes received from the child.
|
|
<DT id="25"><B>-olog</B><I> filename</I>
|
|
|
|
<DD>
|
|
Log into
|
|
<I>filename</I>
|
|
|
|
all the bytes sent to the terminal emulator.
|
|
<DT id="26"><B>-alias</B><I> filename</I>
|
|
|
|
<DD>
|
|
the locale alias file
|
|
<BR>
|
|
|
|
(default: /usr/share/X11/locale/locale.alias).
|
|
<DT id="27"><B>--</B>
|
|
|
|
<DD>
|
|
End of options.
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>EXAMPLES</H2>
|
|
|
|
The most typical use of
|
|
<B>luit</B>
|
|
|
|
is to adapt an instance of
|
|
<B>XTerm</B>
|
|
|
|
to the locale's encoding. Current versions of
|
|
<B>XTerm</B>
|
|
|
|
invoke
|
|
<B>luit</B>
|
|
|
|
automatically when it is needed. If you are using an older release of
|
|
<B>XTerm</B>,
|
|
|
|
or a different terminal emulator, you may invoke
|
|
<B>luit</B>
|
|
|
|
manually:
|
|
<DL COMPACT>
|
|
<DT id="28"><DD>
|
|
$ xterm -u8 -e luit
|
|
</DL>
|
|
<P>
|
|
|
|
If you are running in a UTF-8 locale but need to access a remote
|
|
machine that doesn't support UTF-8,
|
|
<B>luit</B>
|
|
|
|
can adapt the remote output to your terminal:
|
|
<DL COMPACT>
|
|
<DT id="29"><DD>
|
|
$ LC_ALL=fr_FR luit ssh legacy-machine
|
|
</DL>
|
|
<P>
|
|
|
|
<B>Luit</B>
|
|
|
|
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
|
|
<B>Emacs</B>
|
|
|
|
that do not speak UTF-8 well can use
|
|
<B>luit</B>
|
|
|
|
for multilingual output:
|
|
<DL COMPACT>
|
|
<DT id="30"><DD>
|
|
$ luit -encoding 'ISO 8859-1' emacs -nw
|
|
</DL>
|
|
<P>
|
|
|
|
And then, in
|
|
<B>Emacs</B>,
|
|
|
|
<DL COMPACT>
|
|
<DT id="31"><DD>
|
|
M-x set-terminal-coding-system RET iso-2022-8bit-ss2 RET
|
|
</DL>
|
|
<P>
|
|
|
|
<A NAME="lbAG"> </A>
|
|
<H2>FILES</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="32"><B>/usr/share/X11/locale/locale.alias</B>
|
|
|
|
<DD>
|
|
The file mapping locales to locale encodings.
|
|
</DL>
|
|
<A NAME="lbAH"> </A>
|
|
<H2>SECURITY</H2>
|
|
|
|
On systems with SVR4 (``Unix-98'') ptys (Linux version 2.2 and later,
|
|
SVR4),
|
|
<B>luit</B>
|
|
|
|
should be run as the invoking user.
|
|
<P>
|
|
On systems without SVR4 (``Unix-98'') ptys (notably BSD variants),
|
|
running
|
|
<B>luit</B>
|
|
|
|
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
|
|
<B>luit</B>
|
|
|
|
suid root;
|
|
<B>luit</B>
|
|
|
|
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.
|
|
<P>
|
|
<B>Luit</B>
|
|
|
|
will refuse to run if it is installed setuid and cannot safely drop
|
|
privileges.
|
|
<A NAME="lbAI"> </A>
|
|
<H2>BUGS</H2>
|
|
|
|
None of this complexity should be necessary. Stateless UTF-8
|
|
throughout the system is the way to go.
|
|
<P>
|
|
Charsets with a non-trivial intermediary byte are not yet supported.
|
|
<P>
|
|
Selecting alternate sets of control characters is not supported and
|
|
will never be.
|
|
<A NAME="lbAJ"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<A HREF="/cgi-bin/man/man2html?1+xterm">xterm</A>(1), <A HREF="/cgi-bin/man/man2html?7+unicode">unicode</A>(7), <A HREF="/cgi-bin/man/man2html?7+utf-8">utf-8</A>(7), <A HREF="/cgi-bin/man/man2html?7+charsets">charsets</A>(7).
|
|
<PRE>
|
|
<BR>
|
|
<I>Character Code Structure and Extension Techniques (ISO 2022, ECMA-35)</I>.
|
|
<BR>
|
|
<I>Control Functions for Coded Character Sets (ISO 6429, ECMA-48)</I>.
|
|
</PRE>
|
|
|
|
<A NAME="lbAK"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
The version of
|
|
<B>Luit</B>
|
|
|
|
included in this X.Org Foundation release
|
|
was originally written by Juliusz Chroboczek <<A HREF="mailto:jch@freedesktop.org">jch@freedesktop.org</A>>
|
|
for the XFree86 Project and includes additional contributions from
|
|
Thomas E. Dickey required for newer releases of <A HREF="/cgi-bin/man/man2html?1+xterm">xterm</A>(1).
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="33"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="34"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="35"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="36"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DT id="37"><A HREF="#lbAF">EXAMPLES</A><DD>
|
|
<DT id="38"><A HREF="#lbAG">FILES</A><DD>
|
|
<DT id="39"><A HREF="#lbAH">SECURITY</A><DD>
|
|
<DT id="40"><A HREF="#lbAI">BUGS</A><DD>
|
|
<DT id="41"><A HREF="#lbAJ">SEE ALSO</A><DD>
|
|
<DT id="42"><A HREF="#lbAK">AUTHOR</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:18 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|