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; }
In reply to Re: how to output file in Unicode
by philiprbrenan
in thread how to output file in Unicode
by anakin30
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |