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

FIX z_string:s_utf8/2 #439

Merged
merged 1 commit into from
Oct 9, 2012
Merged

FIX z_string:s_utf8/2 #439

merged 1 commit into from
Oct 9, 2012

Conversation

motiejus
Copy link
Contributor

@motiejus motiejus commented Oct 5, 2012

Current checker does not validate that codepoints are within allowed
range. For instance, this encodes U-00000, but passes the current
validator: <<2#110:3, 0:5, 2#10:2, 0:6>>. (<<16#C080>>).

New checker takes into account both utf8 syntax and allowed values that
certain length codepoints can encode.

Background: I was looking for an Erlang utf-8 validator and generator for a bigger project and came across this one. Validator was wrong, so I fixed it. Since there is also a PropEr generator and PropEr test suite, it has a separate repository:
https://github.com/Motiejus/z_string

Note: I did not include PropEr test suite, because PropEr is another dependency. For a more complete test suite see the link above.

Current checker does not validate that codepoints are within allowed
range. For instance, this encodes U-00000, but passes the current
validator: <<2#110:3, 0:5, 2#10:2, 0:6>>. (<<16#C080>>).

New checker takes into account both utf8 syntax and allowed values that
certain length codepoints can encode.
@mworrell
Copy link
Member

mworrell commented Oct 9, 2012

Is your name already in the Contributors file?
If not, with which name/e-mail would you like to be mentioned?

mworrell added a commit that referenced this pull request Oct 9, 2012
@mworrell mworrell merged commit 932e95f into zotonic:master Oct 9, 2012
@mworrell
Copy link
Member

mworrell commented Oct 9, 2012

Thanks!

@motiejus
Copy link
Contributor Author

motiejus commented Oct 9, 2012

Thanks for merging.

As for name and email, please include the one in the commit message.

rpip pushed a commit to rpip/zotonic that referenced this pull request Aug 12, 2013
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

Successfully merging this pull request may close these issues.

2 participants