Hi,

I try to read from a text file that is UTF16 encoded, modify the content and write write it out again. Reading is fine, but  I can not even make a simple copy:


$f=$ARGV[0];
rename($f,"$f.orig");
open(IN,"<:encoding(utf16)","$f.orig");
open(OUT,">:encoding(utf16)","$f");
while (<IN>) { print OUT }'


I then tried to expicitely specify the endianess (utf16-le) for IN and OUT. The best result I get is that just the first line of original and copy are the same. Can I do sth special with the new line or what am I missing ?


Thanks for any help,
Ekkehard


_________________________

CONFIDENTIALITY NOTICE

The information contained in this e-mail message is intended only for the exclusive use of the individual or entity named above and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivery of the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by e-mail and delete the material from any computer.  Thank you.
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to