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



"Gustavo J. A. M. " Carneiro <gjc inescporto pt> writes:

On Ter, 2003-02-11 at 03: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
[snip]
  Use GtkLabel. All widgets in Gtk use pango, so you don't need to use
it directly. If pango doesn't work for you, that's a different story.
Maybe you don't have suitable font installed for the text you want to
display... If you use gtk-2.2, remember to register all your fonts with
fontconfig.

If the OP is having all these problems, most likely his string is
_not_ utf8. 

If you still read this, ZTwinsen, have a look at your strings. What do
they look like? You say they aren't hardcoded, but when it fails, is
there no way you can find out what bytes are in your strings? At
least, in what way does it fail?

Regards, Enrique 



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