in reply to convert a string(which contains the contents of a file) into UTF-8 encoding
open(my $fh_in, '<:encoding(iso-8859-1)', $qfn_in) or die("Can't open \"$qfn_in\": $!\n"); open(my $fh_out, '>:encoding(UTF-8)', $qfn_out) or die("Can't create \"$qfn_out\": $!\n"); print $fh_out $_ while <$fh_in>;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: convert a string(which contains the contents of a file) into UTF-8 encoding
by Anonymous Monk on Sep 29, 2009 at 23:04 UTC | |
by ikegami (Patriarch) on Sep 29, 2009 at 23:42 UTC | |
by perlkamal (Initiate) on Oct 18, 2009 at 23:55 UTC | |
by ikegami (Patriarch) on Oct 20, 2009 at 01:23 UTC |