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.
could be just a question of the font used in your browsers?
did you check the generated html-source?
On Feb 27, 6:17 am, jeronimo [email protected] 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.
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.
On Feb 27, 6:17 am, jeronimo [email protected] 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.