in reply to how to output file in Unicode
sub readUnicode($) {my ($f) = @_; open(my $F, "<:encoding(UTF-8)", $f) or die "Cannot open $f for unic +ode input"; local $/ = undef; <$F>; } sub writeUnicode($$) {my ($f, $s) = @_; if ($f =~ /\A(.+[\\\/])/) {my $d = $1; makePath($d); } open(my $F, ">:encoding(UTF-8)", $f) or die "Cannot open $f"; say {$F} $s; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: how to output file in Unicode
by anakin30 (Acolyte) on Aug 24, 2012 at 08:25 UTC | |
by Anonymous Monk on Aug 24, 2012 at 09:03 UTC | |
by philiprbrenan (Monk) on Aug 24, 2012 at 14:57 UTC | |
by anakin30 (Acolyte) on Aug 27, 2012 at 11:10 UTC | |
by philiprbrenan (Monk) on Aug 27, 2012 at 19:46 UTC |