keysymdef.h has wrong implies symbol?

Simos Xenitellis simos.lists at googlemail.com
Mon Oct 27 04:14:53 PDT 2008


On Mon, Oct 27, 2008 at 6:17 AM, Erik Streb del Toro <mail at erikstreb.de> wrote:
> Peter Hutterer schrieb am 27.10.2008 05:41:
>>
>> On Sat, Oct 25, 2008 at 02:22:03AM -0400, James Cloos wrote:
>>>>>>>>
>>>>>>>> "Peter" == Peter Hutterer <peter.hutterer at who-t.net> writes:
>>>
>>> Peter> diff --git a/src/xlibi18n/imKStoUCS.c b/src/xlibi18n/imKStoUCS.c
>>> Peter> index 83c1483..4b4f628 100644
>>> Peter> --- a/src/xlibi18n/imKStoUCS.c
>>> Peter> +++ b/src/xlibi18n/imKStoUCS.c
>>> Peter> @@ -123,1 +123,1 @@ static unsigned short const
>>> keysym_to_unicode_8a4_8fe[] = {
>>> Peter> -    0x2245, 0x2246, 0x0000, 0x0000, 0x0000, 0x0000, 0x22a2,
>>> 0x0000, /* 0x08c8-0x08cf */
>>> Peter> +    0x2245, 0x2246, 0x0000, 0x0000, 0x0000, 0x0000, 0x21d2,
>>> 0x0000, /* 0x08c8-0x08cf */
>>>
>>> Wow.  Old bug!
>>>
>>> AFAICT it was part of the initial import of the Xfree86 code.
>>>
>>> You are right; that is definitely the correct fix if the comment in
>>> xkeysymdef.h (that XK_implies should be U+21D2 RIGHTWARDS DOUBLE ARROW)
>>> is correct.
>>
>> well, that's the issue with the whole thing (Erik and me discussed that a
>> bit):
>>
>> keysymdef.h states that XK_implies is U+21D2 RIGHTWARDS DOUBLE ARROW.
>> in mathematics, this is the usual symbol for "implies".
>> however, according to http://unicode.org/charts/PDF/U2200.pdf (p 207),
>> "implies" is an alias for RIGHT TACK.
>>
>> so basically: either the comment is wrong, or the code is wrong. we have
>> to
>> pick whether we want to go with unicode or mathematics.
>>
>> As Erik pointed out, right tack does have its own symbol XK_righttack,
>> whereas
>> there's no other XK_... for the double right arrow.
>
> And if you use Gnome, which has it's own X input method (XIM), then you get
> "⇒" if you press a key definded as "implies". But if you start a GTK program
> with
>  export GTK_IM_MODULE=xim && PROGRAMNAME
> then you see the right tack if you press a key definded as "implies".
> Strange, but seems, that the Gnomes did correct this bug without reporting
> it to the X developers.

Both GTK+ IM and X.Org maintain their own copy of the mapping between
keysyms and Unicode characters. This mapping apparently originates
from the work of Marcus Kuhn,a copy of which is at
http://www.cl.cam.ac.uk/~mgk25/ucs/keysyms.txt

I checked the gtk+ commit logs that go back to 2000, and I see that still it was

  { 0x08ce, 0x21d2 }, /*                     implies ⇒ RIGHTWARDS
DOUBLE ARROW */

In XFree86, it appears there was an error when they converted the
original table to
http://cvsweb.xfree86.org/cvsweb/xc/lib/X11/imKStoUCS.c?rev=1.1&content-type=text/vnd.viewcvs-markup
and the problem still shows up there (November 2000).

It is not much of an issue of the gtk+ developers not informing
X.Org/XFree86, but rather an issue with the parsing the original
keysym->Unicode table, that XFree86 did long time ago.

Simos


More information about the xorg mailing list