Unicode not working under Mongrel

hi!

I started my app in mongrel and everything works fine, except that it
doesn’t show the unicode chars right. it worked under WEBrick… where
should I start tackling the problem?
thank you!

david

It’s possible mongrel is not including the charset in the HTTP header
while WEBrick is. In my testing both show unicode chars fine, so you
might want to embed a charset as a meta tag in your app:

 <meta http-equiv="Content-Type" content="text/html;

charset=utf-8" />

This’ll force whatever browser to use utf-8 regardless of what’s in
the header.

On Mar 9, 6:31 pm, “D. Krmpotic” [email protected]

Yes. You nailed it! I’m very thankful for your help…
Something else interests me… is that more or less all that one has to
do to get a full UTF support in Rails (=do nothing)… or do I have to
use something like Globalize plugin to be able to show and store utf
data). Thank you!

DAvid

Is Globalize plugin used for UTF support or just for localization?
If I only want to have the possibility of storing

Eden Li wrote:

It’s possible mongrel is not including the charset in the HTTP header
while WEBrick is. In my testing both show unicode chars fine, so you
might want to embed a charset as a meta tag in your app:

 <meta http-equiv="Content-Type" content="text/html;

charset=utf-8" />

This’ll force whatever browser to use utf-8 regardless of what’s in
the header.

On Mar 9, 6:31 pm, “D. Krmpotic” [email protected]

On the client side, that should be enough. All the browsers I’ve
tested are good about sending data as utf-8.

On the Rails/database side, you’ll need to make sure your database is
storing stuff as utf-8. There are a number of resources out there
that detail what needs to be done. This link [1] is good if you’re on
MySQL.

[1]
http://ruphus.com/blog/2005/06/23/getting-unicode-mysql-and-rails-to-cooperate/

On Mar 10, 5:47 am, “D. Krmpotic” [email protected]