Very strange: Umlauts (äöü) aren't displayed correctly in

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

Joshua Muheim wrote:

But why isn't there just a switch in Rails that allows me poor german
(swiss german) user to use my beloved umlauts?

The simple answer is that nobody has built it yet! There are now a
couple of plugins floating around that provide much better unicode
handling, and there's discussion going on about including some of this
in Rails 1.2. You can expect the situation to improve with time.

Cheers,

Pete Yandell