Preventing LibXML from encoding all special characters to their html form?

Hi.

From what I unsertand, Rails uses by default LibXML.

When doing a to_xml, it encodes all special characters, which is useful for <, &, >, etc. but not really for ü, ô, etc.

First, I can’t convert them back from ɒ to “û” which is very frustrating for my tests.

And I cannot manage to force LibXML not to encode all characters.

Any help? Thanks.

For those who wonder, the same encoding can be applied this way:

require ‘builder/xchar’

string.to_xs

And to decode, you can do encoded_string.gsub(/&#([a-f0-9]);/) { |s| [$1.to_i].pack('U’) }

Thank you Builder doc!

http://rubydoc.info/gems/builder/2.1.2/frames