Luit
   HOME

TheInfoList



OR:

luit is a
utility program Utility software is software designed to help analyze, configure, optimize or maintain a computer. It is used to support the computer infrastructure - in contrast to application software, which is aimed at directly performing tasks that benefit ord ...
used to translate the
character set Character encoding is the process of assigning numbers to graphical characters, especially the written characters of human language, allowing them to be stored, transmitted, and transformed using digital computers. The numerical values tha ...
of a
computer program A computer program is a sequence or set of instructions in a programming language for a computer to execute. Computer programs are one component of software, which also includes documentation and other intangible components. A computer program ...
so that its output can be displayed correctly on a
terminal emulator A terminal emulator, or terminal application, is a computer program that emulates a video terminal within some other display architecture. Though typically synonymous with a shell or text terminal, the term ''terminal'' covers all remote term ...
that uses a different character set. Whereas
iconv In Unix and Unix-like operating systems, iconv (an abbreviation of internationalization conversion) is a command-line program and a standardized application programming interface (API) used to convert between different character encodings. "It ...
converts the character set of strings or
text file A text file (sometimes spelled textfile; an old alternative name is flatfile) is a kind of computer file that is structured as a sequence of lines of electronic text. A text file exists stored as data within a computer file system. In operat ...
s 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 UTF-8 is a variable-length character encoding used for electronic communication. Defined by the Unicode Standard, the name is derived from ''Unicode'' (or ''Universal Coded Character Set'') ''Transformation Format 8-bit''. UTF-8 is capable of ...
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 The Secure Shell Protocol (SSH) is a cryptographic network protocol for operating network services securely over an unsecured network. Its most notable applications are remote login and command-line execution. SSH applications are based on ...
legacy-machine
", a user may have to run "" to properly render French accented characters on a
UTF-8 UTF-8 is a variable-length character encoding used for electronic communication. Defined by the Unicode Standard, the name is derived from ''Unicode'' (or ''Universal Coded Character Set'') ''Transformation Format 8-bit''. UTF-8 is capable of ...
terminal. luit is also used to properly render the output of applications that use
ISO 2022 ISO/IEC 2022 ''Information technology—Character code structure and extension techniques'', is an ISO/ IEC standard (equivalent to the ECMA standard ECMA-35, the ANSI standard ANSI X3.41 and the Japanese Industrial Standard JIS X 0202) in the ...
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 code ANSI escape sequences are a standard for in-band signaling to control cursor location, color, font styling, and other options on video text terminals and terminal emulators. Certain sequences of bytes, most starting with an ASCII escape char ...
s that switch to an alternate character set in order to draw line-drawing characters. luit is invoked automatically by
xterm In computing, xterm is the standard terminal emulator for the X Window System. It allows users to run programs which require a command-line interface. If no particular program is specified, xterm runs the user's shell. An X display can sho ...
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.


History

luit was written in 2001 by Juliusz Chroboczek,"luit author website"
/ref> when major
Linux Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, w ...
distributions began migrating to the
Unicode Unicode, formally The Unicode Standard,The formal version reference is is an information technology standard for the consistent encoding, representation, and handling of text expressed in most of the world's writing systems. The standard, wh ...
character set from "legacy" encodings such as ISO 8859-1."UTF-8 and Unicode FAQ for Unix/Linux"
/ref> It has since become a widely installed base utility, present on more than half of all
Linux Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, w ...
computer systems by some estimates. It is also part of IBM's AIX.


Implementations

There are two versions of luit: one maintained by
Thomas Dickey Lynx is a customizable text-based web browser for use on cursor-addressable character cell terminals. , it is the oldest web browser still being maintained, having started in 1992. History Lynx was a product of the Distributed Computing Group ...
"luit home page"
/ref> as part of
xterm In computing, xterm is the standard terminal emulator for the X Window System. It allows users to run programs which require a command-line interface. If no particular program is specified, xterm runs the user's shell. An X display can sho ...
, and another formerly updated by
Freedesktop.org freedesktop.org (fd.o) is a project to work on interoperability and shared base technology for free-software desktop environments for the X Window System (X11) and Wayland on Linux and other Unix-like operating systems. It was founded by Hav ...
. Some Linux distributions ship the latter version as part of their
X11 The X Window System (X11, or simply X) is a windowing system for bitmap displays, common on Unix-like operating systems. X provides the basic framework for a GUI environment: drawing and moving windows on the display device and interacting wi ...
utilities package. However, while migrating to GitLab, the latter fork was discontinued because it was unmaintained.


See also

*
Mojibake Mojibake ( ja, 文字化け; , "character transformation") is the garbled text that is the result of text being decoded using an unintended character encoding. The result is a systematic replacement of symbols with completely unrelated ones, oft ...


References


External links

* {{Freedesktop.org Unix text processing utilities