We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a58ab5f commit f79931fCopy full SHA for f79931f
1 file changed
test/client/tc_utf8_escaping.rb
@@ -5,6 +5,7 @@ class UTF8Test < Test::Unit::TestCase
5
def test_escaping_invalid_utf_8_characters
6
client = OAI::Client.new 'http://localhost:3333/oai' #, :parser => 'libxml'
7
invalid_utf_8 = [2, 3, 4, 104, 5, 101, 6, 108, 66897, 108, 66535, 111, 1114112, 33, 55234123, 33].pack("U*")
8
+ invalid_utf_8 = invalid_utf_8.force_encoding("binary") if invalid_utf_8.respond_to? :force_encoding
9
assert_equal("hello!!", client.send(:strip_invalid_utf_8_chars, invalid_utf_8).gsub(/\?/, ''))
10
end
11
0 commit comments