
dr.codin
New User
Sep 12, 2012, 9:17 PM
Post #3 of 3
(749 views)
|
|
Re: [Zhris] Reg. Chinese chars ???
[In reply to]
|
Can't Post
|
|
Thanks Zhris. But i cant make the script so specific to only CN... i need to make it generic UTF-8 to handle all languages. Below is the code which writes the text into XLS file -
sub write_file { my $contents = shift; my $filename = shift; $g_error_message .= "Writing empty file $filename" unless $contents =~ /\S/; open(FILE1,"> $filename"); #print_log('filenamessS--- '.$filename); #open(FILE1,">:encoding(UTF-8)","$filename"); #print_log('contentssS--- '.Encode::encode( "UTF-8", $contents )); #my $contents_utf = Encode::encode( "UTF-8", $contents ); #open (FILE1 ,"> encoding(utf8)", "$filename"); binmode FILE1,':utf8'; print FILE1 $contents; close FILE1; return 0; } Any pointers to this experts ??? Help really appreciated... Thanks & Regards, dr.codin
(This post was edited by dr.codin on Sep 12, 2012, 9:19 PM)
|