Re: Gtk::Label::set_text() doesn't grok international characters?



I've just stumbled upon a very strange thing... if $lbl is a
Gtk::label, and I tell it to $lbl->set_text("child"), it works
great, but if I tell it to $lbl->set_text("ni?o), it doesn't
change $lbl's text. Same goes for $lbl->set(). Am I missing
something here?

Gtk converts text to wide char representation when tries to draw it.
If the conversion fails set_text() does nothing.
Result of such conversion depends on the text and LANG environment variable.
Examine the X locale database (normally resides in /usr/X11R6/lib/X11/locale)
and read man charsets for more info.






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