All,
I posted this in Rails Talk, and other people have the same issue:
Currently, to_xml will automatically escape any entities into their corresponding &XXX representation. There's a piece in the documentation that says "If $KCODE is set to 'u' and encoding set to 'UTF8', then escaping will NOT be performed."
Unfortunately, this doesn't appear to be the case. Even after following the docs and ensuring that default_charset is indeed UTF-8 (actually the default for Rails nowadays), we still get encoded characters in to_xml output.
Since our client is UTF-8 aware, we need to pass thru the UTF-8 data intact. The escaping actually causes client problems. The only way we've found to do this is with the following horrible monkey-patch:
module Builder class XmlBase def _escape(text) text end end end
Any ideas on a proper patch? I'm willing to work on it (already working on another patch for timezone stuff with Geoff anyways)
Thanks, Nate