I''m trying to get UTF-8 working, but I can''t get it work fully. I have the data in my MySQL-database, the tables and fields are in utf-8 charset. If I query the database from the terminal, all UTF-8 characters show up nicely. The pages I''m outputting have the following header <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>And Unicode characters I''m putting directly into the view files are also showing up correctly. The encoding parameter in database.yml is set to utf8. However, strings from the database are output mangled, both in Safari and Firefox. Is there anything I''ve missed? I''m running Mac OS X 10.5.2, Rails 2.0.2, Ruby 1.8.6, MySQL gem 2.7. Any help is appreciated. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
could be just a question of the font used in your browsers? did you check the generated html-source? -- 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 -~----------~----~----~----~------~----~------~--~---
> could be just a question of the font used in your browsers? > did you check the generated html-source?Yes, I checked: the UTF-8characters from the database are output as several different characters, so somewhere UTF-8 was interpreted incorrectly, but I have no clue where. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
minch-xNeiC4e+sNpBDgjK7y7TUQ@public.gmane.org
2008-Mar-10 12:11 UTC
Re: UTF-8 not working (Mac OS X)
On Feb 27, 6:17 am, jeronimo <3i.jeroen.heijm...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > could be just a question of the font used in your browsers? > > did you check the generated html-source? > > Yes, I checked: the UTF-8characters from the database are output as > several different characters, so somewhere UTF-8 was interpreted > incorrectly, but I have no clue where.I had the same problem, tried everything and it came down to removing/ commenting out the ''encoding'' line from each environment section of my database.yml. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
minch-xNeiC4e+sNpBDgjK7y7TUQ@public.gmane.org
2008-Mar-10 12:11 UTC
Re: UTF-8 not working (Mac OS X)
On Feb 27, 6:17 am, jeronimo <3i.jeroen.heijm...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > could be just a question of the font used in your browsers? > > did you check the generated html-source? > > Yes, I checked: the UTF-8characters from the database are output as > several different characters, so somewhere UTF-8 was interpreted > incorrectly, but I have no clue where.I had the same problem, tried everything and it came down to removing/ commenting out the ''encoding'' line from each environment section of my database.yml. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---