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

Don't raise exception on invalid UTF-8 output #250

Merged
merged 1 commit into from Dec 23, 2014

Conversation

cirosantilli
Copy link
Contributor

This could be reproduced with:

./test/spec_tests.py --program kramdown --pattern Enti

with Kramdown version 1.5.0.

The main problem is that it would stop future tests from being carried out.

After this commit it is just counted as a failure.

The error message printed is of the form:

Unicode error: 'utf8' codec can't decode byte 0xfc in position 8: invalid start byte
'<p># \xd3\x92 \xcf\xa0 \xef\xbf\xbd</p>\n'
'<p># \xd3\x92 \xcf\xa0 \xfc\x85\xb8\xb0\xa9\xb8</p>\n'

This could be reproduced with:

    ./test/spec_tests.py --program kramdown --pattern Enti

with Kramdown version 1.5.0.

The main problem is that it would stop future tests from being carried out.

After this commit it is just counted as a failure.

The error message printed is of the form:

    Unicode error: 'utf8' codec can't decode byte 0xfc in position 8: invalid start byte
    '<p># \xd3\x92 \xcf\xa0 \xef\xbf\xbd</p>\n'
    '<p># \xd3\x92 \xcf\xa0 \xfc\x85\xb8\xb0\xa9\xb8</p>\n'
jgm added a commit that referenced this pull request Dec 23, 2014
Don't raise exception on invalid UTF-8 output
@jgm jgm merged commit 9d4174f into commonmark:master Dec 23, 2014
jgm added a commit that referenced this pull request Dec 23, 2014
Indicate which is expected and which is actual output.
@cirosantilli cirosantilli deleted the deal-invalid-unicode branch December 23, 2014 09:49
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.

None yet

2 participants