On Jul 30, 9:21 pm, jeb <[email protected]> wrote: > That seems to work, the problem is when reading the data using mysql2. > In the database å is stored as å. > When I write to the database using mysql2, without having changed it, > it writes å. >
What does mysql think the column types are ? Before using mysql2, what encoding was set in your database.yml ? Fred > On 30 Juli, 22:17, Frederick Cheung <[email protected]> > wrote: > > > > > On Jul 30, 8:31 pm, jeb <[email protected]> wrote: > > > > I think it's more a question of how the data is stored in the > > > database. > > > In my layout i have: > > > <meta http-equiv="content-type" content="text/html;charset=UTF-8" /> > > > and in application.rb: > > > config.encoding = "utf-8" > > > Also possible. If previously the database connection was configured as > > some latin1 variant and your columns were also latin1 but you were > > stuffing utf8 data into them then switching to mysql2 would cause data > > to appear messed up. > > > Fred > > > > :-) j > > > > On 30 Juli, 20:15, Frederick Cheung <[email protected]> > > > wrote: > > > > > On Jul 30, 7:00 pm, jeb <[email protected]> wrote: > > > > > > When using the mysql2 gem with my excising databases all non-standard > > > > > chars gets messed up: > > > > > > från is shown as från in the browser > > > > > > Is this possible to fix or do I have to continue using the old mysql- > > > > > gem? > > > > > IIRC mysql2 forces use of utf8. If you're elsewhere telling the > > > > browser that you're using a different character set then you'd get > > > > unwanted results. > > > > > Fred -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

