`playdate->json->decode` incorrectly decodes escape sequences in the range `\u0080`-`\u00FF`

Using playdate->json->decode, the following json value is correctly parsed into utf8:

{
    "value": "  ©  "
}

value: 20 20 c2 a9 20 20

however, when using escape sequences (pdc seems to automatically sanitize json to use these, so this is quite relevant)

{
    "value": "  \00a9  "
}

value: 20 20 a9 20 20

Note that this is now treated as ASCII-encoded, a single byte a9, and critically, this is invalid utf8.

I think I'm misunderstanding.. pdc copies json files verbatim to the output pdx, doesn't do any processing. Can you post a bit of code showing exactly what you're doing?

Ahh, sorry! You’re right about pdc. My build script was set up to use python’s json.dump when copying a certain json file, and that’s why it replaces the utf8 character with unicode.

Still, it seems to me to be a problem with json→decode that it emits \u00a9 as a single byte instead of valid utf8, but emits `©` as a valid utf8 two-byte sequence.

Would you like me to post code illustrating this bug still? I can try to put a short demo .c file together.