logo       
Google Custom Search
    AddThis Social Bookmark Button

Re: UTF8: msg#00184

Subject: Re: UTF8
On Mon, Oct 28, 2002 at 08:43:42PM +0100, Jens Luedicke wrote:
> I came across a problem with non-UTF8 strings (as returned by an function).
> gtk2-perl refused to display them and gave an error message. 
> I used Unicode::String to convert them.

--- snip ------------------------
#!/usr/bin/perl -w

use Unicode::String qw(latin1 utf8);
use Gtk2::Button;

Gtk2->init(\@ARGV);
my $str = latin1(shift)->utf8;
my $window = Gtk2::Window->new('toplevel');
my $button = Gtk2::Button->new($str);
$button->signal_connect('clicked', \&handler, undef);
$window->add($button);
$window->show_all;
Gtk2->main;

sub handler { Gtk2->quit; }
--- snip ------------------------
give it a latin1 as argument,
whines a bit but works at least with perl 5.8



Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>