Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Mar 2010 23:30:05 +0000 (UTC)
From:      naddy@mips.inka.de (Christian Weisgerber)
To:        freebsd-questions@freebsd.org
Subject:   Re: Compose key and xterm vs. UTF-8
Message-ID:  <hnmftt$sb0$1@lorvorc.mips.inka.de>
References:  <hnh9td$ph3$1@lorvorc.mips.inka.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Christian Weisgerber <naddy@mips.inka.de> 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@mips.inka.de




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?hnmftt$sb0$1>