Umlauts not getting displayed properly in XML

I have mysql db encoding = UTF-8 with the table say “T” and field
“fld” with one record. When I do T.first.fld on rails console it gives
me “hllo”. Umlauts gets display properly in the database, rails
console, development logs and browser. I have an API which uses
xml.builder to create the xml and sends the xml out. In the XML
“hello” gets displayed as "hülloü. Even my XML is using
UTF-8 encoding.
Any idea or suggestions anyone why is this happening? Also I am using
rails 2.3.10 and ruby REE.


On Nov 9, 9:29pm, binu [email protected] wrote:

ü is one way of representing in xml - ü means “the utf
code point #252”, which is .

It’s in theory not necessary, but does make it less likely that some
non utf8 understanding program will mangle the data. I seem to recall
builder doing this escaping by default (look at the to_xs method it
adds on string)