Utf-8 problems


#1

Hi,

I have some problems with utf-8 configuration with my blog
(www.rubykids.de).

It’s
o Typo 4.0
o database collation set to utf8_unicode_ci (database and all the
tables)
o database.yml contains “encoding:utf8”
o database content is utf8 (checked via export and Vi)
o Typo seems to send response header Content-Type=“text/html;
charset=utf-8”
correctly
o I manually added a before_filter to application.rb with the on line:
@headers[“Content-Type”] = “text/html;charset=UTF-8”
I did this after the problem occured the first time, but it seems to be
worthless.

Now I have the strange effect that after some days/weeks all special
characters (especially german umlauts)
are displayed encoded incorrectly. It looks very ugly and
unprofessional. I
found out that the following
workaround helps:
o sweep the Typo cache
o force fastcgi process to restart

Sometimes I have to do both twice.

Has anybody encountered similar effects? Is there a known bug I am not
aware
of?
Any help is extremely appreciated.

Thanks in advance.

Cheers!
Frithjof


#2

On Thursday 19 April 2007 18:58, Frithjof Eckhardt wrote:

Has anybody encountered similar effects? Is there a known bug I am not
aware of?
Any help is extremely appreciated.

I’ve had this happen to me but in all situations, looking at the
response
headers showed that it wasn’t sending UTF-8.

I’m not sure if it was due to caching or whatnot, but explicitly
adding “AddDefaultCharset utf-8” to public/.htaccess solved the problem
for
me.

TX


#3

I will try it, thanks. But what is strange to me is that the content
itself
arriving at my browser is wrongly encoded already and as I anderstand
the
“content-type” thing, it tells the browser only how to interpret the
content. So when the characters are arriving crumbled, the browser has
no
chance anymore to display something meeningful.

2007/4/20, Trejkaz removed_email_address@domain.invalid: