Arturas Slajus created JRUBY-6425: ------------------------------------- Summary: rexml fails in utf-8 parsing in 1.9 mode Key: JRUBY-6425 URL: https://jira.codehaus.org/browse/JRUBY-6425 Project: JRuby Issue Type: Bug Components: Ruby 1.9.2 Affects Versions: JRuby 1.6.6 Reporter: Arturas Slajus Assignee: Thomas E Enebo
{noformat} arturas@arturaz-fujitsu:~/work/jruby/xmlbug$ JRUBY_OPTS="--1.9" rvm jruby-1.6.6,ruby-1.9.2,ruby-1.9.3 do ruby xmlbug.rb Ruby: java, 1.9.2 Encoding::CompatibilityError: incompatible character encodings: UTF-8 and ASCII-8BIT concat at org/jruby/RubyString.java:2499 to_s at /home/arturas/.rvm/rubies/jruby-1.6.6/lib/ruby/1.9/rexml/parseexception.rb:24 message at org/jruby/RubyException.java:245 Ruby: i686-linux, 1.9.2 Parsed OK. Ruby: i686-linux, 1.9.3 Parsed OK. {noformat} Test case: {noformat} arturas@arturaz-fujitsu:~/work/jruby/xmlbug$ cat xmlbug.rb # encoding: utf-8 puts puts puts "Ruby: #{RUBY_PLATFORM}, #{RUBY_VERSION}" require 'rexml/document' xml = %Q{?xml version="1.0" encoding="UTF-8" ?> <xml><tag>į</tag></xml>}.force_encoding("UTF-8") doc = REXML::Document.new(xml) puts "Parsed OK." {noformat} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email