Subject: | Bad UTF-8 gives bad scalars. |
When provided with invalid UTF-8 (which happens unfortunately often),
XML::Fast produces corrupt scalars.
$ perl -MXML::Fast -MDevel::Peek
-e'Dump(xml2hash(qq{<root>\xB2</root>})->{root});'
SV = PV(0x920d7d8) at 0x922a248
REFCNT = 1
FLAGS = (POK,pPOK,UTF8)
PV = 0x922e2d8 "\262"\0Malformed UTF-8 character (unexpected
continuation byte 0xb2, with no preceding start byte) in subroutine
entry at -e line 1.
[UTF8 "\x{0}"]
CUR = 1
LEN = 12