Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.7.0.pre1
-
Fix Version/s: JRuby 1.7.0.pre2
-
Component/s: Encoding
-
Labels:
-
Environment:Windows XP Pro SP3 (running in a VMware 4 VM on OS X)
Java(TM) SE Runtime Environment (build 1.6.0_30-b12)
Java HotSpot(TM) Client VM (build 20.5-b03, mixed mode, sharing)
-
Number of attachments :
Description
Considering the following test snippet:
# coding: utf-8 require 'nokogiri' xml = "<foo>bar</foo>" puts "XML string encoding: #{xml.encoding}" doc = Nokogiri::XML::Document.parse(xml) puts "Parsed root name encoding: #{doc.root.name.encoding}"
Running this using JRuby 1.6.7.2 (in 1.9 mode) gives the expected:
XML string encoding: UTF-8 Parsed root name encoding: UTF-8
Running this using JRuby 1.7.0.preview1 gives:
XML string encoding: UTF-8 Parsed root name encoding: Window-1252
Someone mentioned in the IRC channel that it might be related to JRUBY-6679 but I'm not really sure, since it clearly works for me using JRuby 1.6.7.2.
Can you show versions of Nokogiri for each of the tests above?