Jruby requires explicit declaration of character encoding on the to_xml method, otherwise it tries to turn everything into USASCII