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

feat(CRuby): XML::Reader#encoding returns detected enc when not set #2377

Merged
merged 1 commit into from Dec 10, 2021

Conversation

flavorjones
Copy link
Member

What problem is this PR intended to solve?

Closes #980

Previously Reader#encoding always and only returned the encoding passed to the
constructor. Now, if no encoding is passed to the constructor, then
Reader#encoding will return the encoding detected by the parser.

Have you included adequate test coverage?

Yes.

Does this change affect the behavior of either the C or the Java implementations?

Note that this has not been implemented for JRuby.

Previously this always and only returned the encoding passed to the
constructor. Now, if no encoding is passed to the constructor, then
Reader#encoding will return the encoding detected by the parser.

Note that this has not been implemented for JRuby.
@flavorjones flavorjones merged commit 2ab961e into main Dec 10, 2021
@flavorjones flavorjones deleted the 980-reader-encoding-detection branch December 10, 2021 13:28
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.

Nokogiri::XML::Reader#encoding and Nokogiri::XML::Reader#xml_version giving wrong output
1 participant