-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
I have been trying to use this package, I am also trying to bridge it to my typed-encoding project.
I have more of a question than an issue:
decodeXyz functions seem to be overly permissive. Here is an example of decoding an invalid ASCII ByteString:
>>> decodeStrictByteStringExplicit ASCII "\239"
Right "\239"Here is a UTF8 example:
>>> decodeStrictByteStringExplicit UTF8 "\192\NUL"
Right "\NUL"
>>> encodeStrictByteStringExplicit UTF8 "\NUL"
"\NUL"I imagine this is just part of the design.
Is there a way to check that encoded text is valid other than
a round trip decodeXyz followed by encodeXyz to see if the outcome is the same?
Thank you for your help!
erikd and simonmichael
Metadata
Metadata
Assignees
Labels
No labels