in reply to Re: Difficulty with UTF-8 and file contents
in thread Difficulty with UTF-8 and file contents
That's useless. DATA, being the handle used by perl to read the source, is affected by the existing use utf8;.
use if $ARGV[0], "utf8"; printf "%vX\n", scalar(<DATA>); __DATA__ é
$ perl a.pl 0 C3.A9.A $ perl a.pl 1 E9.A
The OP's problem appears to be a lack of encoding of the output, not a lack of decoding of the input.
|
|---|