Conversation
|
I don't follow. JSON is always UTF-8, as per the spec. |
|
I based this on the existing transcoding behavior. JSONEncodingTest#test_parse explicitly tests UTF-16 and UTF-32 input, and This PR addresses that conversion failing when a character spans chunks. Is transcoding intentional for ResumableParser, or should it only accept UTF-8 input? I apologize if I've misunderstood something. |
Yeah, those are old tests, I wouldn't have added them myself. I'm open to eagerly validating / rejecting that case though. |
|
I see. I understand now, and I agree with your point. Thanks for explaining it. I'll close this PR. |
ResumableParser transcodes each chunk independently, raising an encoding error when a character spans chunks.
Keep an Encoding::Converter across feeds and reset it on clear. Add coverage for split characters, encoding changes, and invalid sequences.