Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ByteStrings won't work with Unicode characters #11

Closed
cdornan opened this issue Jun 11, 2017 · 3 comments
Closed

ByteStrings won't work with Unicode characters #11

cdornan opened this issue Jun 11, 2017 · 3 comments

Comments

@cdornan
Copy link

cdornan commented Jun 11, 2017

makeRegexOptsM is using ByteString unpack which won't decode Unicode characters.

Would a UTF-8 decoder be better?

@cdornan
Copy link
Author

cdornan commented Jun 11, 2017

(There is the same issue with ByteString.Lazy of course.)

@cdornan
Copy link
Author

cdornan commented Jun 11, 2017

And also, more fundamentally, uncons. Clearly, regex-tdfa currently takes the view that there will be one character per byte in ByteString.

I can see the logic to this, especially in years gone by, but folks increasingly seem to be expecting UTF-8 to be the encoding when nothing has been explicitly specified.

@cdornan
Copy link
Author

cdornan commented Jul 1, 2017

I see regex-tdfa-utf8 is available for the purpose.

@cdornan cdornan closed this as completed Jul 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant