# Encoding problem - how to debug?

**URL:** <https://www.ruby-forum.com/t/encoding-problem-how-to-debug/88157>\
**Category:** Rails I18n\
**Created:** [March 8, 2007, 3:50pm UTC](https://www.ruby-forum.com/t/encoding-problem-how-to-debug/88157 "2007-03-08T15:50:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![linus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/f4b2a3/32.png) [@linus](https://www.ruby-forum.com/u/linus)\
**Post date:** [March 8, 2007, 3:50pm UTC](https://www.ruby-forum.com/t/encoding-problem-how-to-debug/88157/1 "2007-03-08T15:50:29Z")

</div>

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
