CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
unicode inperl

 



paramjit
New User

Jun 27, 2011, 12:08 AM

Post #1 of 2 (524 views)
unicode inperl Can't Post

I am trying to write a string to a unicode file but not all the characters are written to the file
my code is
Code

$file="Test1.enc";
open my $FH, ">:raw:encoding(UTF16-LE):crlf:utf8", "$file";
print $FH "\x{FEFF}";
print $FH "„qy„{z„ˇ{„y„Ł„~";
print $FH "$enc1";
close $FH;


can anyone please tell me what am i doing wrong
when i open the Test1.enc i get

qy{zˇ{yŁ~

Thanks


rovf
Veteran

Jun 27, 2011, 12:24 AM

Post #2 of 2 (522 views)
Re: [paramjit] unicode inperl [In reply to] Can't Post

Crossposted, for instance at:

http://perlmonks.org/index.pl?node_id=911509

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives