Hey Chaps

There seems to be some kind of issue with UTF-16 encoding in libxml- 
ruby version 0.5.2.0.

When I do this:

doc = XML::Document.new()
# doc.encoding = 'utf-16'
doc.root = XML::Node.new('root_node')
root = doc.root
puts doc
## => <?xml version="1.0"?><root_node/>

Uncomment the encoding however and you get this:

doc = XML::Document.new()
doc.encoding = 'utf-16'
doc.root = XML::Node.new('root_node')
root = doc.root
puts doc
## => ÿþ<

Any idea whats going on here and how to fix it? The encoding features  
used to work no problem at all. Im running ruby 1.8.6 (2007-06-07  
patchlevel 36) [universal-darwin9.0]

Cheers

Tim


_______________________________________________
libxml-devel mailing list
libxml-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/libxml-devel

Reply via email to