Hi,
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 "hülloü". 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.

Thanks,
-Binesh

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

  • Frederick Cheung at Nov 10, 2011 at 2:58 pm

    On Nov 9, 9:29 pm, binu wrote:
    Hi,
    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 "hülloü". 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.
    ü 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)

    Fred

    Thanks,
    -Binesh
    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedNov 9, '11 at 9:30p
activeNov 10, '11 at 2:58p
posts2
users2
websiterubyonrails.org
irc#RubyOnRails

2 users in discussion

Binu: 1 post Frederick Cheung: 1 post

People

Translate

site design / logo © 2021 Grokbase