Hi,

I'm trying to get a grip on how XML::Reader behaves when processing
input files with varied encodings.

When processing an XML I can call Reader#encoding and I get an integer
that seems to correctly indicate the encoding of the file (by matching
constants in the XML::Encoding::* space).

I also notice that I can pass an :encoding option to the string(),
file() and io() class methods, although in my testing modifying this
option has no effect. What is this option for?

Finally, I've tested parsing ISO-8859-1, UTF-8 and UTF-16 files. When I
grab a node from the ISO-8859-1 and UTF-16 files, I get a string that is
UTF-8 encoded. Does libxml transparently convert all input files to
utf-8?  It's fine if it does, I'm just trying to get the behaviour
straight in my own head!

-- James Healy <jimmy-at-deefa-dot-com>  Thu, 04 Jun 2009 16:52:21 +1000
_______________________________________________
libxml-devel mailing list
libxml-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/libxml-devel

Reply via email to