Flinn Mueller on 21 Jun 2007 19:02:38 -0000

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PhillyOnRails] utf8

Does anyone have experience with UTF8 or other encodings in rails applications? I'm experiencing some failure in actionmailer where my subject contains a string that is encoded in utf8.

The subject line of my mail is interpolated like so: "[Foo] # {subject_from_an_ar_object}"

Delivery seems to fail, and I see the my subject looking like so:

Subject: =?utf-8?Q?=5bFoo=5d_some_utf8_string...

I've been reading on utf8 in ruby and from what I've seen so far, ruby doesn't support utf8. ( http://redhanded.hobix.com/inspect/ unicodeLibForRuby18.html ). I've also seen some things on mysql support for utf8. My database tables (mysql) are all using a default charset = latin1. I'm guessing that since I have international users I should be converting my tables to utf8. I've also seen I should: ActionMailer::Base.default_charset = 'utf-8'

So can anyone share some experience, gotchas or best uses on dealing with the majority of the world's character encoding?
To unsubscribe or change your settings, visit: