in reply to Re^7: JSON::XS (and JSON::PP) appear to generate invalid UTF-8 for character in range 127 to 255
in thread JSON::XS (and JSON::PP) appear to generate invalid UTF-8 for character in range 127 to 255

why doesn't utf8::upgrade 'change' the string if it does the following:

Because it's meant not to, and none of that changes the string.

And utf8::upgrade is the one that produces exactly the kind of strings that is_sane_utf8 is intended to catch, so 'upgraded' strings is a good enough description

Nope. It only flags some upgraded strings.

unlike 'double encoding',

Yeah, saying it checks for that would be wrong too. I just took your word for it earlier.

  • Comment on Re^8: JSON::XS (and JSON::PP) appear to generate invalid UTF-8 for character in range 127 to 255