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 |
Beta Was this translation helpful? Give feedback.
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
Char
value. 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 forfastparse
about that.Here is a working test:
The byte sequence
0xEDA080
is not a valid UTF-8 character. How can I detect that?I did not expect to obtain the
Char
value65533
here. 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?Beta Was this translation helpful? Give feedback.
All reactions