in reply to Re: using win32::guitest in non english OS
in thread using win32::guitest in non english OS
I have some chinese text in a inputfile encoded in utf8 format. I just want to read the text from the file and keep that text in a variable for further use. But when i am trying to print the line which is read, i am getting some text in Chinese, but different from what is present in the input file. Plese guide me in how to get the exact text present in input file
use File::BOM; use Cwd; use Encode; use Encode::Detective; use strict; use warnings; my $filename=cwd().'/saml.txt'; File::BOM::open_bom(FH, $filename, ':utf8'); my $line=<FH>; my $encoding = Encode::Detective::detect ($line); print "encoding - $encoding\n"; binmode(STDOUT, ":utf8"); print "*$line*\n";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: using win32::guitest in non english OS
by Anonymous Monk on Jan 04, 2013 at 10:04 UTC | |
by cstar (Initiate) on Jan 04, 2013 at 11:05 UTC |
In Section
Seekers of Perl Wisdom