Compose key and xterm vs. UTF-8

Christian Weisgerber naddy at
Mon Mar 15 23:30:09 UTC 2010

Christian Weisgerber <naddy at> wrote:

> Short:
> ------
> Why do compose key sequences fail to work in a UTF-8 xterm?

And the short answer is:  They work--if you know the right sequences.

The compose key handling presumably comes out of some X11
library; xterm is just the recipient.  The actual compose table
used depends on the locale encoding.  There is an index at
$PREFIX/lib/X11/locale/compose.dir and you can find the tables in
$PREFIX/lib/X11/locale/*/Compose.  It turns out that the UTF-8 table
is _quite_ extensive (6676 lines) and all the common characters I
was looking for are in fact there.

So why didn't I find them?  Order matters.  The ISO8859-* compose
tables list two-character sequences in both orders.  The UTF-8 table
allows only one order.  For the last twenty years I've been used
to entering, say, <a><apostrophe> to input an 'a' with an acute
accent, but the UTF-8 compose table only accepts <apostrophe><a>.
Oh well.

On a side note: GTK+2 comes with its own compose tables and the
sequences I'm used to work fine in GTK applications like Firefox.

Christian "naddy" Weisgerber                          naddy at

More information about the freebsd-questions mailing list