Repository navigation
Replies: 1 comment
|
Easiest thing to do would be to convert It looks like fastparse/fastparse/src/fastparse/ParserInput.scala Lines 48 to 52 in 49ba3cf |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
When the input comes from a byte array that contains an invalid utf-8 sequence, the parser seems to silently convert that sequence into a different
Charvalue. I would like to be able to detect that the input contains invalid utf-8 sequences. Where can I specify the input encoding? I could not find any options forfastparseabout that.Here is a working test:
The byte sequence
0xEDA080is not a valid UTF-8 character. How can I detect that?I did not expect to obtain the
Charvalue65533here. It seems that the decoder inserts this character to signify an invalid code sequence (this is a "replacement" character). Is there any way for me to override this behavior?All reactions