From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020827 Description of problem: Xutf8LookupString performs an unnecessary ISO 8859-1 -> UTF-8 translation, thereby corrupting keyboard input data. This happens only if the X client runs on Red Hat 8.0 in a UTF-8 locale *and* the X server does not have XKB activated, is for example the case by default with the Solaris 5.8 X server. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Use an X server with XKB disabled 2. LC_ALL=en_GB.UTF-8 xterm (with correct ISO10646-1 fonts) 3. If you have no non-ASCII keysym on your keyboard (e.g., you have US keyboard), then map with xmodmap a keysym such as adiaeresis) onto a key and press it in the xterm. Actual Results: The application in the xterm receives the UTF-8 sequence for the keystream as if it had been passed unnecessarily through a ISO 8859-1 -> UTF-8 converter. Expected Results: The correct UTF-8 sequence should have been received and the correct character appear on the screen (d). Additional info: This bug was located on 2002-11-29 by Ivan Pascal (pascal.ru), explained the same day on the i18n mailing list and fixed in patch number 5513 sent to XFree86.Org: --- xc/lib/X11/XKB.c.orig Fri Nov 29 11:13:59 2002 +++ xc/lib/X11/XKB.c Fri Nov 29 11:16:16 2002 @@ -417,9 +417,10 @@ unsigned values; #endif { - if ((dpy->flags & XlibDisplayNoXkb) || - (!dpy->xkb_info && !XkbUseExtension(dpy,NULL,NULL))) - return False; + if (!dpy->xkb_info) + XkbUseExtension(dpy,NULL,NULL); + if (!dpy->xkb_info) + return 0; affect&= XkbLC_AllControls; dpy->xkb_info->xlib_ctrls&= ~affect; dpy->xkb_info->xlib_ctrls|= (affect&values); @@ -434,9 +435,10 @@ Display * dpy; #endif { - if ((dpy->flags & XlibDisplayNoXkb) || - (!dpy->xkb_info && !XkbUseExtension(dpy,NULL,NULL))) - return 0; + if (!dpy->xkb_info) + XkbUseExtension(dpy,NULL,NULL); + if (!dpy->xkb_info) + return 0; return dpy->xkb_info->xlib_ctrls; } For more information, see the thread "XFree86 Xutf8LookupString BUG with Solarix X server" started by myself on 2002-11-28 on i18n.
Please attach the patch as a file attachment. Cut and pasted patches always get munged in bugzilla.
Oh, I forgot to mention... I'll put this into my next erratum for 8.0 which will be 4.2.1 based. Thanks.
Created attachment 87665 [details] Xfree86 patch 5513 by Ivan Pascal <pascal.ru>
Thanks Markus. Patch applied to my 4.2.1-9.6 build. Will be in future erratum release. This should probably be commited to the xf-4_2-branch by someone with CVS write permission also. Closing as ERRATA, as it will be public when errata is released.