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: correctly recognize encoding errors in libxml >= 2.12.0 #644

Merged
merged 1 commit into from
Jun 12, 2024

Conversation

flavorjones
Copy link
Member

Starting with libxml2 v2.12.0, encoding errors have a message that was not being detected by Page#encoding_error? resulting in a page that was parsed using incorrect encoding.

This change updates Page to detect those errors as encoding errors and as a result we get the expected encoding back on the parsed document.

Starting with libxml2 v2.12.0, encoding errors have a message that was
not being detected by Page#encoding_error? resulting in a page that
was parsed using incorrect encoding.

This change updates Page to detect those errors as _encoding errors_
and as a result we get the expected encoding back on the parsed
document.
@flavorjones flavorjones merged commit c38962c into main Jun 12, 2024
9 checks passed
@flavorjones flavorjones deleted the flavorjones-fix-bad-encoding-detection branch June 12, 2024 21:03
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.

1 participant