luit

{{lowercase}}

{{use mdy dates|date=March 2022}}

{{About|utility software program|the musical instrument|lute}}

{{Infobox software

| name = luit

| screenshot = Luit demo screenshot.png

| caption = luit rendering ISO 8859-1 accented characters on a UTF-8 terminal emulator.

| author = Juliusz Chroboczek

| released = {{Start date and age|2001}}

| latest release version = 2.0

| latest release date = {{Start date and age|2013|02|17}}{{Cite web |title=LUIT - Change Log |url=https://invisible-island.net/luit/luit.log.html#t20130217 |at=2013-02-17}}

| programming language =

| operating system = Unix and Unix-like

| genre = Utility software

| license = MIT/X Consortium License

| website = {{Official URL}}

}}

luit is a utility program used to translate the character set of a computer program so that its output can be displayed correctly on a terminal emulator that uses a different character set.{{Cite web |title=luit manual page |url=https://invisible-island.net/luit/manpage/luit.html}} Whereas iconv converts the character set of strings or text files at rest, luit converts the input and output of programs running interactively.

Overview

The main purpose of luit is to allow "legacy" applications that use character sets other than UTF-8 to work with contemporary terminal emulators.

luit may be required today when connecting to a "legacy" host that only supports an older encoding, such as ISO 8859-1. For example, instead of running "ssh legacy-machine", a user may have to run "{{code|2=sh|1=LC_ALL=fr_FR luit ssh legacy-machine}}" to properly render French accented characters on a UTF-8 terminal.

luit is also used to properly render the output of applications that use ISO 2022 character set switching. ISO 2022 is an older standard that allowed an application to "switch" between different fonts, e.g., to mix line-drawing characters with text or to display text in multiple languages and character sets. UTF-8 itself does not support switching fonts; the encoding is stateless and gives each unique character (including line-drawing characters) its own numerical encoding. It can be used to translate between these two encodings.

Examples of programs that require translation to run correctly on a UTF-8 terminal include earlier versions of emacs/MULE, and programs that use ISO 2022 shift sequences in ANSI escape codes that switch to an alternate character set in order to draw line-drawing characters.

luit is invoked automatically by xterm when necessary to translate program output into UTF-8, for programs running on a local computer. When connecting remotely to another computer, the user must run luit directly.

luit interprets application output according to the locale's character set with ISO 2022 shifts and ECMA-48 escape sequences. If an application is speaking a different language than the locale's character set (one that may have matched the terminal emulator's expectations in the absence of luit), luit can misinterpret the application's output and produce corrupted output to the terminal.[http://www.win.tue.nl/~aeb/linux/misc/xterm.html#luit "luit notes"]

History

luit was written in 2001 by Juliusz Chroboczek,[http://www.pps.univ-paris-diderot.fr/~jch/software/luit/ "luit author website"] when major Linux distributions began migrating to the Unicode character set from "legacy" encodings such as ISO 8859-1.[http://www.cl.cam.ac.uk/~mgk25/unicode.html "UTF-8 and Unicode FAQ for Unix/Linux"] It has since become a widely installed base utility, present on more than half of all Linux computer systems by some estimates.[http://qa.debian.org/popcon.php?package=x11-utils "x11-utils Debian popularity contest results"][http://popcon.ubuntu.com/by_inst "Ubuntu popularity contest results"] It is also part of IBM's AIX.[http://pic.dhe.ibm.com/infocenter/aix/v7r1/index.jsp?topic=%2Fcom.ibm.aix.cmds%2Fdoc%2Faixcmds3%2Fluit.htm AIX 7.1 manual]

Implementations

There are two versions of luit: one maintained by Thomas Dickey[http://invisible-island.net/luit/ "luit home page"] as part of xterm, and another formerly updated by Freedesktop.org.[http://cgit.freedesktop.org/xorg/app/luit "Xorg luit home page"]{{Cite web |last=Coopersmith |first=Alan |date=2012-03-22 |title=Luit 1.1.1 release announcement |url=http://lists.x.org/archives/xorg-announce/2012-March/001894.html}} Some Linux distributions ship the latter version[http://www.mail-archive.com/xorg@lists.freedesktop.org/msg06477.html "Freedesktop mailing list discussion, 'luit forked?', April 2009] as part of their X11 utilities package. However, while migrating to GitLab, the latter fork was discontinued because it was unmaintained.{{cite mailing list |url=https://lists.x.org/archives/xorg-devel/2018-August/057386.html |date=August 7, 2018 |mailing-list=xorg-devel@lists.x.org |author=Adam Jackson |title=[PATCH app/luit] Retire this fork of luit}}

See also

References

{{Reflist}}