# Encoding Problem / mod\_rails / passenger / Postgresql 8.3

**URL:** <https://www.ruby-forum.com/t/encoding-problem-mod-rails-passenger-postgresql-8-3/166550>\
**Category:** Rails\
**Created:** [April 27, 2009, 9:19am UTC](https://www.ruby-forum.com/t/encoding-problem-mod-rails-passenger-postgresql-8-3/166550 "2009-04-27T09:19:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [April 27, 2009, 9:19am UTC](https://www.ruby-forum.com/t/encoding-problem-mod-rails-passenger-postgresql-8-3/166550/1 "2009-04-27T09:19:45Z")

</div>

Hi,

when I use mod\_rails/passenger with apache2 on linux instead of  
webbrick for our application, then it stops working with certain  
browsers like the ie, and konqueror but still works with firefox.

I get the following error message:

ActionView::TemplateError (PGError: ERROR: invalid byte sequence for  
encoding “UTF8”: 0xad  
HINT: This error can also happen if the byte sequence does not match  
the encoding expected by the server, which is controlled by  
“client\_encoding”.  
: SELECT \* FROM “users” WHERE (“users”.“login” = E’Â­Ã«)Â¢{Ã—M|mÃ{Ã“  
Â¿â–’Ã›Ã·oÂ·Å“Ã·NÂ¹Ã¯Â¯wÃ—ÃžÅ’’) AND (users.state = E’active’) LIMIT 1) on line #32  
of app/views/layouts/application.html.erb:

I think I get the messgae because the login string is not encoded in  
the char encoding which postgresql expects. The database stores text  
in utf8.

But because the application works without problems with webbrick it  
seems that this is an mod\_rails/apache2 issue? Any ideas what I could  
do to fix this?

Fritz
