Hi there, I need some help with characters (charactersets): I have "special characters" in some db fields. When those fields are used for the composition of an email, those "special characters" show up screwed up in the email text, for example: - a ''ü'' in my db becomes a ''ü'' in the email body. - a ''é'' in my db becomes a ''é'' in the email body. I suppose this has something to do with the choice of the charactersets, but I don''t know where the "bug" exactly lies... in phpMyAdmin, I can see that - MySQL charset: UTF-8 Unicode (utf8) Furthermore, I have set the following to "latin1_general_ci": - MySQL connection collation - the collation of the entire db - the collation of all tables - the collation of all columns (that have the type "varchar") And: I used http://www.collation-charts.org/mysql60/ to check that my charset/collation "latin1_general_ci" really *contains* the characters needed (ö, ü, é, etc.), so I think that must be the right choice. Thank you for any help with this! Tom -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org 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 -~----------~----~----~----~------~----~------~--~---
Ok, here''s the issue, in case anyone is interested (internationalization...): The email client used was Thunderbird. And Thunderbird uses by default the following encoding: Western ISO-8859 ...also known as... ISO 8859-2 Central European So the MySQL db needed to use the same encoding or "the corresponding collation" (which is "latin2_general_ci") in order to encode special characters such as ''ü'' or ''é'' correctly. (http://dev.mysql.com/doc/refman/5.1/en/charset-charsets.html) Tom -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org 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 -~----------~----~----~----~------~----~------~--~---
Plus, the mailer model needed one more line: def my_mail() charset "latin1" # -> tell it to use Western ISO-8859 encoding ! from blah recipients blah subject blah etc... end -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---