Encoding problem - how to debug?

When I put character “Ä…” in the search input page, I get the falowing in
the logs:

Processing SearchController#index (for 127.0.0.1 at 2007-03-08 15:36:18)
[POST]
Session ID: f3e7710bce35c8ca7476b7829e8a801d
Parameters: {“action”=>“index”, “controller”=>“search”, “query”=>“Ä…”,
“model”=>{“name”=>“pages”}}

The query string is incorrectly encoded, or maybe the log file is
incorectly encoded?
Nevertheless, then I pass that string to ferret, I get incorrect results
(the database is inported from other system and is 100% correct
encoded).

I can not debug the reason for this happening.

I use ruby 1.8.5, rails-1.2.2. I have headers[“Content-Type”] ||=
“text/html; charset=UTF-8” and page encoding set to UTF8.

Any ideas how to debug what is the problem?

Best regards,
Tom