Re: to print a utf8 string in gtk app. , urged plz



On Mon, 2003-02-10 at 22:35, ZTwinsen wrote:
hi all,
 
     I want to print a utf8 string in gtk app. by a
easier way, does anybody can help me? I know there
have few topic about utf8 string posted before in the
mailing list. However, I have tried all the method,
but still not work. I want to display a utf8 string in
a local variable, so I can't use gettext since it's
not hardcoded. I also tried to g_utf8_normalize the
string and then display, it even can't display in
g_print(utf8 string can display in g_print, but not my
app!). I even tried to draw it in pixmap by
gdk_draw_text, but it is deprecated and failed. I
heard about label and entry are  transparently support
Unicode and multi-lingual text in www.pango.org , it
still not worked . The last choice is pango, but there
have no tutorial, just have API doc. , where should i
begin?? plz HELP ME!

With GTK+ 2.0 or greater:

gtk_label_new ("Some UTF-8 string")

will just work. Perhaps your UTF-8 string isn't
actually encoded in UTF-8?

Regards,
                                  Owen





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]