Problem with encoding in buffer tabs

Stephen J. Turnbull stephen at xemacs.org
Sat Jan 6 06:03:41 EST 2007


Aidan Kehoe writes:

 >  >  > This problem is easiest to describe with a picture. Look at the
 >  >  > attached file. The current buffer is named "åäö" (and just happens to
 >  >  > include the very same characters, which might not be that good, but
 >  >  > ignore that.) You'll see the name properly shown on the mode line. But
 >  >  > in the buffer tab it is not.
 >  > 
 >  > See http://mid.gmane.org/17783.57166.702433.928548@parhasard.net and related
 >  > thread.
 > 
 > Bugger; there is no related thread, Stephen sent me a response,

That's weird; I don't have it either, although I remember sending it.

Anyway, for the benefit of people who would like to have
internationalized tabs and other widgets, the situation is like this:

The gutter and native widget stuff is undocumented (except for Lisp
docstrings and what little I've written) and hard to work with.  The
X11 support for tabs and progress bars, including Motif (for sure) and
GTK (AFAIK), is based on a 3rd-party widgets by Ed Falk.  The default
menubar and scrollbars, of course, are hoary Lucid-specific widgets.
The toolbar is not a widget, it's a homebrew gadget (the difference is
that a widget is backed by its own window and so can receive events
directly, a gadget is a rectangular region in a larger widget and thus
its events must be handled by the parent, like an HTML imagemap).

None of these widgets/gadgets support faces properly, although you can
specify initialization of the toolbar colors with a face.  "Proper"
support requires hooking into specifiers so that a change in a face
induces corresponding changes in widget resources.

None of these widgets that display text use the XEmacs redisplay
functions to do so.  The menubar was kludged to use X Font Sets (for
non-Motif X11 builds) and XFontLists (for Motif builds), but this is
just too disgusting to be worth copying, especially since we want to
be moving to Xft anyway.  The tabs just send whatever text they get
directly to the widget.  This means that for anything but Latin-1,
you'll just get garbage in the tabs.

It would probably be possible to copy some of the code that translates
from Mule code to Unicode out of redisplay-x.c into lwlib-fonts.c, and
train the various widgets to use those functions.  But this would be
kind of hairy because it would break the encapsulation of lwlib pretty
badly.  It also seems to be harder than it should be because the whole
console/device/display set of abstractions is totally entangled.

I've done some work on each of the various pieces, so I'd be happy to
help if somebody wants to take the lead on it.  But it's going to be a
while before I can do any serious work on it.




More information about the XEmacs-Beta mailing list