Xt can't handle UTF8 string ?

hd h.dupont65 at laposte.net
Mon Jan 12 04:06:36 PST 2009


Hi,

Is it possible to display an UTF8 string with Xt verbs ?

I try to use "XtNinternational" argument without success
Maybe, I must initialize the App with a special Xt verb before using 
XtNinternational ?



it is my sample, for testing purpose
int main (int argc, char **argv)
{
        Widget toplevel, form, w;
        toplevel = XtOpenApplication (&app_context, "XFirst", NULL, 0, 
&argc,
                                        argv, NULL, 
applicationShellWidgetClass, NULL, 0);
        form = XtVaCreateManagedWidget ("form", formWidgetClass, 
toplevel, NULL);
        w = XtVaCreateManagedWidget ("quit_button", commandWidgetClass, 
form,
//                              XtNinternational, True, XtNlabel, "*** 
utf8 text : éèà ***", NULL); // => display "*** utf8 text : " <= only 
the left part of the string !
                                XtNlabel, "*** utf8 text : éèà ***", 
NULL);                                  // => display "*** utf8 text : 
<wrong chars (like ISO char) > ***
        XtAddCallback (w, XtNcallback, quit_proc, NULL);
        XtRealizeWidget (toplevel);
        XtAppMainLoop (app_context);
}

Thanks





More information about the xorg mailing list