[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xfree-i18n
Subject:    [I18n]Problem with XOpenIM
From:       "Dave Williss" <dwilliss () microimages ! com>
Date:       2002-11-12 15:24:29
[Download RAW message or body]

In implementing support for XIM in our application, I ran 
across a problem.

By default, the X libraries don't trust setlocale() on 
MacOS X, so it doesn't matter what locale you set it to, 
XOpenIM thinks it's "C".  I found _Xsetlocale() and it
got further, but still XOpenIM still failed.  Tracing into it,
I found the following...

in imDefIm.c, there are several lines in which it calls
_XlcOpenConverter() to setup various character 
conversion things.  If any one of these fail, the whole
thing fails and all you have to go by is that XOpenIM
returned NULL.  Some XWarnings would be helpful
here.

The problem was that for some reason, any call to
_XlcOpenConverter() involving XlcNUtf8String or
_XlcNUcsChar were failing.  I was unable to figure
out why this happened, but I can tell you it worked
on Linux and failed on MacOS X.  Commenting out
 those lines allowed XOpenIM to work.  

It may have been as a result of my commenting out
those few lines, but then XwcLookupString() started
returning 2-byte things in SJIS encoding instead of
Unicode.  I was able to cope with that by just switching
to XmbLookupString() and doing the conversion myself.

 -- Dave Williss
------
Meddle not in the affairs of dragons, 
   for you are crunchy and taste good with catsup

_______________________________________________
I18n mailing list
I18n@XFree86.Org
http://XFree86.Org/mailman/listinfo/i18n
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic