Subject: | How read utf8 charachters from AddTextfield() in Win32::Gui |
Hi
I Write a Script with Win32::Gui. I have problem for read from
AddTextfield() with UTF8 character.
when I Write or type with utf8 in AddTextfield() , and then I want print
it , unkonw charachter printed.
How can I encode or decode printing text to utf8?
please help me
thankyou
Subject: | azansinformation.pl |
#!C:/strawberry/perl/bin/perl.exe
use strict;
use warnings;
use Encode;
use utf8;
use Win32::API ();
use Win32::GUI();
my $main = Win32::GUI::Window->new(
-width => 300,
-height => 170,
-left => 200,
-top => 100,
-minsize => [300,170],
-maxsize => [300,170],
-dialogui =>1,
);
$main->AddTextfield(
-name => 'nametextfield',
-pos=>[50,50],
-size => [ 140, 25 ],
-align => 'right',
-tabstop => 1,
);
my $savelabel = $main->AddButton(
-name => 'save',
-text =>'click me',
-pos => [50,100],
-tabstop => 1,
);
print $main->nametextfield->Text;
$main->Show();
Win32::GUI::Dialog();
sub Main_Terminate {
return -1;
}
sub save_Click{
my $nn = $main->nametextfield->Text();
print $nn;
}