Simpler: open (my $fh2, '>:encoding(UTF-16)', $textfile2)open (my $fh2, '+>', $textfile2) or die "Cannot open file.$!"; my $str2 = decode('UTF-16', $out2, Encode::FB_CROAK); print $fh2 $str2;
No, it seems you misread decode as encode.
In reply to Re^6: Unicode issues with emc uemcli
by haukex
in thread Unicode issues with emc uemcli
by pritesh_ugrankar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |