Re: String Encocoding in Gtk-Perl: Hoping for Clarification
- From: Peter Daum <gator_ml yahoo de>
- To: gtk-perl-list gnome org
- Subject: Re: String Encocoding in Gtk-Perl: Hoping for Clarification
- Date: Sun, 09 May 2010 10:40:10 +0200
On 2010-05-09 08:42, Brian Manning wrote:
Gtk2-Perl is still returning UTF-8 data.
your example does indeed produce the same result on old and new systems,
obviously because "ord" and "split" work on characters, not bytes ...
Do you have a complete example that shows your problem?
#!/usr/bin/perl -w
use Gtk2 -init;
my $window = new Gtk2::Window( "toplevel" );
my $vbox = new Gtk2::VBox(1,5);
my $button = new Gtk2::Button( "print" );
my $entry = new Gtk2::Entry;
$window->signal_connect( "delete_event", sub { Gtk2->main_quit } );
$button->signal_connect( "clicked", sub {
print map( {sprintf("%X ", $_) } unpack("C*", $entry->get_text )), "\n"
});
$window->add( $vbox );
$vbox->add($entry);
$vbox->add( $button );
$window->show_all();
Gtk2->main;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]