(worked for me)my $file_segment_name = "TestFile1.svd"; open( I, "<:encoding(UTF-16LE)", $file_segment_name ) or die "$file_segment_name: $!"; local $/; $_=<I>; # slurp full file content in one read s/\x{feff}//; # remove BOM @lines = split /\r\n/; print "line #$_ : $lines[$_] (EOL)\n" for ( 0 .. $#lines );
In reply to Re: Problems parsing UTF16 file
by graff
in thread Problems parsing UTF16 file
by stu23
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |