String Encocoding in Gtk-Perl: Hoping for Clarification

In the past, I wrote several Gtk2-Perl tools for system administration.
Fortunately, most of the time I am dealing with ASCII text. On some
occasions however, I need to deal with German text (usually ISO-8859-1).

Already quite some time ago, I upgraded the system on all my machines
(Debian 5.0, Perl 5.10,Gtk2-Perl 1.190). Now, looking for a bug in a
program that ran for years without problems, I just discovered that
obviously at some point in time the handling of non-ascii text changed.

In the past, all data returned from any Gtk widgets used to be
UTF8-encoded (I vaguely remember that there were some locale-dependant
issues; I consistently use "en_US.ISO-8859-1"). Now in the same context
I get 8-bit data.

Using some little test programs, I verified, that Gtk2 still returns
everything in utf8, so the change must be somewhere in Gtk2-Perl or in
Perl. When I run the following code snippet:

my $button = new Gtk2::Button( "print" );
my $entry  = new Gtk2::Entry;
$button->signal_connect( "clicked",sub {print $entry->get_text,"\n"} );

the data in the entry always is printed latin1-encoded (no matter, what
the locale is set to)- which is fine with me, for all my purposes
"classical" 8-bit charsets are good enough, I just would like to know
what to expect (for the moment, I fixed my program by analyzing data if
it's more likely utf8 or latin1, just in case this changes again ... ;)

Can anybody here maybe clarify this?


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