Joshua,
There's a lot you need to do to make Rails handle UTF8 correctly. See
http://wiki.rubyonrails.com/rails/pages/HowToUseUnicodeStrings
In short:
1. You need to make sure your database is set to use UTF8, which it
probably won't be if you've created it in CocoaMySQL. Use ALTER
DATABASE xyz CHARSET='utf8'
2. You need to tell Rails to speak to the database in UTF8 by adding
"encoding: utf8" to each database in database.yml
3. You need to tell Ruby that you want to use UTF8 by putting the
following in your environment.rb:
require 'jcode'
$KCODE='u'
4. You need to make Rails pass back the correct content type header
by putting the following in application.rb:
after_filter :set_charset
def set_charset content_type = @headers["Content-Type"] || 'text/html' if /^text\//.match(content_type) @headers["Content-Type"] = "#{content_type}; charset=utf-8" end end
Cheers,
Pete Yandell