in reply to How read utf8 charachter from AddTextfield() in Win32::Gui

unknown character showing for me.

Where is it showing that (what program)?

For example cmd.exe shows the output of

perl -Mopen=:std,utf8 -e" print $_, ' ',chr($_), ' ' for 931 .. 935"
as

931 Σ 932 Τ 933 Υ 934 Φ 935 Χ

But notepad will gladly show Sigma/Tau/Upsilon/Phi/Chi:

931 Σ 932 Τ 933 Υ 934 Φ 935 Χ

In both cases the bytes are the same

$ perl -Mopen=:std,utf8 -e" print $_, ' ',chr($_), ' ' for 931 .. 935" + |hexdump 00000000: 39 33 31 20 CE A3 20 39 - 33 32 20 CE A4 20 39 33 |931 93 +2 93| 00000010: 33 20 CE A5 20 39 33 34 - 20 CE A6 20 39 33 35 20 |3 934 + 935 | 00000020: CE A7 20 - | | 00000023;

Replies are listed 'Best First'.
Re^2: How read utf8 charachter from AddTextfield() in Win32::Gui
by mohamad (Initiate) on Apr 04, 2010 at 20:45 UTC
    main problem is in the , insert in databases. thankyou.
        this is my code.
        #!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; }
        please show me a sample of get utf8 character from AddTextfield() and print it it ,IDE or in cmd. my database connection and others setting is correct. thankyou.