Re: displaying unicode characters under X11

From: Mark Leisher (mleisher@crl.nmsu.edu)
Date: Thu Dec 04 1997 - 20:42:44 EST


    Michael> I have an application that stores its messages in Unicode, and
    Michael> I'm attempting to add an X11/Motif UI to it. If I convert a
    Michael> Unicode message into a Motif XmString (using
    Michael> XmStringCreateLocalized), when the XmString is displayed the
    Michael> non-ASCII characters show up as garbage.

    Michael> What do I need to do to have X11 display the Unicode characters
    Michael> correctly? Is there some font that I need to tell it to use?

In short, it is a royal pain in the neck with Motif as it is. Version 2.1
might have some better way of handling it, but I haven't looked at it yet.

One thing you might want to try is to get one of the Unicode BDF fonts that is
available, create your XmString with UCS-2 text and a tag for the Unicode
font. I haven't actually tried this yet, so don't take my word as gospel :-)
One thing is for certain, even if that works, it won't render any script that
needs context analysis or reordering for rendering.

Perhaps a member of the OpenGroup can inform us about the progress commercial
Unix vendors are making in this area. Haven't heard much from the commercial
vendors recently, but Linux seems to be progressing much faster in this area.
------------------------------------------------------------------------
mleisher@crl.nmsu.edu
Mark Leisher "A designer knows he has achieved perfection
Computing Research Lab not when there is nothing left to add, but
New Mexico State University when there is nothing left to take away."
Box 30001, Dept. 3CRL -- Antoine de Saint-Exupéry
Las Cruces, NM 88003



This archive was generated by hypermail 2.1.2 : Tue Jul 10 2001 - 17:20:38 EDT