Currently, it appears 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 only way we’ve found to do this is thru the following
What’s the proper way to do this?