http://invisible-island.net/
Copyright © 2006–2018,2022 by Thomas E. Dickey


luit – Locale and ISO 2022 support for Unicode terminals

Synopsis

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. It is mainly used to support xterm.

History

Luit was written by Juliusz Chroboczek for the XFree86 Project in 2001-2002. There were improvements and fixes by several people, in particular Tomohiro Kubota's extensions for CJK encodings.

Like xterm, luit uses the MIT-X11 license. There was some early speculation (in 2001) about using GPL which can be seen in mailing list archive (this and this for example). However, because GPL-licensed code is/was unacceptable in that realm, that speculation came to nothing.

There was no maintainer for some time; I adopted it in 2006 to ensure that it continued to support xterm (details are listed in the luit.log.html file within the source).

Besides the maintenance issue that attracted my attention in 2005 (untested changes to compiled-in file locations by Xorg hackers), Luit has had from the outset a technical issue: its associated font-encoding library.

Juliusz Chroboczek used the font-encoding library to work around performance issues with direct use of iconv. This solution has proven to be a drawback:

I solved the problem by implementing an efficient conversion using iconv. Luit still supports the font-encoding library if it is found by the configure script. If you choose, luit can easily be built using iconv.

However, as of luit 2.0, the font-encoding library has been deprecated:

Metrics

Here is a summary of the code growth, starting from XFree86 and contrasting against changes made in the Xorg fork. To provide a better comparison, I first discarded generated or externally-maintained files:

.gitignore, Makefile.in (when autogenerated), ChangeLog (when autogenerated), aclocal.m4 (when autogenerated), config.h.in (when autogenerated), autogen.sh, compile, config.guess, config.sub, configure, depcomp, install-sh, missing, mkdirs.sh, mkinstalldirs, builtin.c (generated), *.enc (generated)

In short, discard the files which are not maintained by the respective developers of each branch. The autogenerated files were initially included, and later dropped without any effort expended.

Luit code-growth
Date Branch Release Total
Files
Total
Lines
Diffstat Diff against
Files
Changed
Lines
Added
Lines
Deleted
2002-12-08 XFree86 snapshot 15 3490 N/A N/A N/A N/A
2004-10-27 XFree86 snapshot 15 3780 8 403 113 2002-12-08
2005-12-21 Xorg 1.0.1 21 3899 8 218 99 2004-10-27
2006-08-21 XTerm 20060820 20 6158 21 4044 1666 2004-10-27
2006-11-08 Xorg 1.0.2 21 3915 4 62 46 1.0.1
2008-01-31 Xorg 1.0.3 21 3918 9 108 105 1.0.2
2008-08-23 XTerm 20080823 20 6650 18 971 479 2006-08-21
2008-08-29 XTerm 20080829 20 6714 3 108 44 2008-08-23
2009-08-16 XTerm 20090816 21 7003 15 436 172 2008-08-29
2009-10-01 Xorg 1.0.4 21 3951 7 80 47 1.0.3
2009-10-14 XTerm 1.0-20091014 21 7080 8 149 47 2009-08-16
2010-02-09 Xorg 1.0.5 18 3973 3 36 14 1.0.4
2010-06-01 XTerm 1.0-20100601 32 7324 31 806 562 2009-10-14
2010-06-05 XTerm 1.0-20100605 32 7515 8 206 15 2010-06-01
2010-10-06 Xorg 1.1.0 20 4653 17 2702 2022 1.0.5
2010-11-28 XTerm 1.0-20101128 37 8820 25 1651 346 2010-06-05
2011-10-30 XTerm 1.2-20111030 37 9253 16 620 187 2010-11-28
2012-01-29 XTerm 1.2-20120129 37 9688 11 549 114 2011-10-30
2012-03-23 Xorg 1.1.1 20 4655 8 39 37 1.1.0
2012-10-14 XTerm 1.2-20121014 37 9727 15 873 834 2012-01-29
2013-02-17 XTerm 2.0-20130217 39 12586 21 3505 646 2012-10-14
2014-12-04 XTerm 2.0-20141204 39 12702 10 196 80 2013-02-17
2015-07-06 XTerm 2.0-20150706 39 12893 9 521 330 2014-12-04
2016-05-08 XTerm 2.0-20160508 39 12980 10 144 57 2015-07-06

You may notice several things from the data:

Platforms

Luit is known to work with

Aside from Solaris, luit had not been ported to other Unix systems before 2012.

For some older versions (noticed with HPUX and FreeBSD) you may need to use the -p command-line option to work around a problem copying the terminal settings from the standard input to the pseudo-terminal.

Bugs

You should report bugs to me.


Changes

See the changelog for details:

changes with links...

Documentation


Download

Screenshots

Here are some screenshots of luit.

There are numerous references on the net to luit. Here are a few of the more interesting ones: