Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^5: Unicode issues with emc uemcli

by ikegami (Patriarch)
on Sep 07, 2020 at 23:12 UTC ( [id://11121471]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Unicode issues with emc uemcli
in thread Unicode issues with emc uemcli

Simpler:

open (my $fh2, '>:encoding(UTF-16)', $textfile2)

Replies are listed 'Best First'.
Re^6: Unicode issues with emc uemcli
by haukex (Archbishop) on Sep 08, 2020 at 06:52 UTC
    open (my $fh2, '+>', $textfile2) or die "Cannot open file.$!"; my $str2 = decode('UTF-16', $out2, Encode::FB_CROAK); print $fh2 $str2;
    Simpler: open (my $fh2, '>:encoding(UTF-16)', $textfile2)

    No, it seems you misread decode as encode.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11121471]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2024-04-26 02:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found