Re: Gtk::Label::set_text() doesn't grok international characters?
- From: "Federico Heinz" <fheinz vialibre org ar>
- To: "GTK Perl Mailing LIst" <gtk-perl-list gnome org>
- Subject: Re: Gtk::Label::set_text() doesn't grok international characters?
- Date: 28 May 2001 13:41:32 ART
On Mon, 28 May 2001 19:45:52 +0400, Pavel Rousnak said:
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.
Thanks, Pavel, that's exactly the problem. I have LANG="C", and
changing LANG to "es_AR" did the trick.
I do think that this is a bug, not a feature, though. I happen
to like LANG="C". My native language is spanish, but when it
comes to working on the computer I prefer english, thank you.
LANG should affect the way the program displays its own stuff,
not the data it handles. I found out about this using Pronto, a
great Perl::Gtk mail user agent. I receive mail in about five
different languages. Am I supposed to quit my app and switch
LANG settings according to the message I intend to read? Or am I
just being stupid?
Is this a Perl::Gtk issue, or is it plain Gtk?
Federico
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]