#!/usr/bin/perl

use strict;
use Encode;

use Gtk2 -init;
#use utf8;

my $msg = "áçéáéŕã";

my $win = Gtk2::Window->new("toplevel");
$win->set_position("center");
$win->signal_connect("delete_event", sub { exit });

my $box = Gtk2::VBox->new ($msg);
$box->show;

my $label = Gtk2::Label->new ($msg);
$label->show;
$box->pack_start ($label, 1, 1, 0);

my $label = Gtk2::Label->new (decode ("UTF-8", $msg));
$label->show;
$box->pack_start ($label, 1, 1, 0);

$win->add ($box);


my $dialog = Gtk2::MessageDialog->new(undef, "modal", "info",
				      "close", $msg);
$dialog->run;
$dialog->destroy;

my $dialog = Gtk2::MessageDialog->new(undef, "modal", "info",
				      "close", decode ("UTF-8", $msg));
$dialog->run;
$dialog->destroy;


$win->show;
Gtk2->main;
