by zombot · 5mo ago · 0 comments
In practice, lots of text formats (JSON, XML) embed or hint the character encoding in the format.
On the other hand, if your parser combinators process char-by-char, then maintaining a small "is this valid UTF-8 so far" context on the side should be pretty simple, so providing it would be an useful option, but actually decoding? Please don't.