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

Issue reproduction for ISO-8859-1 parsing on JRuby #2080

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions test/files/iso-8859-1.xml
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<FEED>
<DATA>Accept�</DATA>
<DATA>Something</DATA>
</FEED>
15 changes: 15 additions & 0 deletions test/test_iso.rb
@@ -0,0 +1,15 @@
require "helper"

class TestISO < Nokogiri::TestCase
def test_iso_content_not_lacking_accents
data = IO.binread('test/files/iso-8859-1.xml')
document = Nokogiri::XML(data)
assert_equal "Accepté", document.at('DATA').text
end

def test_iso_content_not_truncated
data = IO.binread('test/files/iso-8859-1.xml')
document = Nokogiri::XML(data)
assert_equal 2, document.search('DATA').count
end
end