Re: Unexpected display of non-ASCII



You have to add :
use encoding "utf-8";


Example code:

#!/usr/bin/perl -w

use strict;


use encoding "utf-8";


use Glib qw(TRUE FALSE);
use Gtk2 '-init';

my $window = Gtk2::Window->new ('toplevel');

my $label = Gtk2::Label->new('£10.00 $10.00 €10.00 ¥10.00');
$window->add ($label);

$window->signal_connect (delete_event => sub {Gtk2->main_quit} );
$window->show_all;
Gtk2->main;


More info:
perldoc encoding


Cyril

----------------------------------
Cyril Cheneson

"A Perl module would prefer that you stay out of its living room
because you weren't invited, not because it has a shotgun"



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