RE: Opening & writing to UTF-8 files; copyright symbol again -- solution
[email protected] ("PHILLIPS M.E.") Mon, 16 Nov 2015 09:59:31 +0000
| Newsgroups | perl.perl4lib |
|---|---|
| Message-ID | <DE5A87935C81284782298B0D297D6784224471DB@CISCMRMBS02.mds.ad.dur.ac.uk> |
> You can set the correct encoding succinctly on opening files > e.g. open my $fh, '>:encoding(UTF-8)', $outfile You might also see this even more succinct variant: open my $fh, '>:utf8', $outfile though technically speaking, that will not give you guaranteed conformant U= TF-8 because it could contain code points that are excluded from the Unicod= e standard. So Colin's suggestion is safer. Matthew