XmString UTF-8 Handling! :(

This forum is read only. No new submissions are accepted.

Questions about motif? Contact us

1 post / 0 new
XmString UTF-8 Handling! :(

Submitted by sagaur on Tue, 06/01/2004 - 10:58.

I am internationalizing a solaris application.

I am working on solaris 2.8 and the code is X11R5/Motif1.2 based.

All of the code was working previously for ja, ja_JP-SJIS locales etc where dialog strings are double bytes.

We were using same XmStringCreate functions for both single byte (roman encoding) and double byte (japanese) locales.

Now I am trying to internationalize this. I want to have static strings , labels in dialogs in UTF8 strings.

I hard coded the strings (just to send a test popup) to a plain UTF-8 value ( a greek alpha character) and passed it to XmStringCreate. I expected to see the alpha in that pop-up message but I saw junk. I had correctly set the font to some utf font which will be having glyphs for that character.

I feel that if the old code worked for single byte characters, double byte characters then it should work here.

The key is that the strings passed to XmStringCreate should match the encoding of the locale in which we are working.

Thus in a SJIS locale the string has to be SJIS etc.

I passed the UTF-8 string and expected the same result. But this doesn't seem to work.

I am running out of ideas.

HELP !!!!