Forum Moderators: phranque

Message Too Old, No Replies

mod_rewrite international chars challenge!

Have problems with ØÆÅ øæå chars not being transformed corretly

         

zyron

12:34 pm on Feb 24, 2005 (gmt 0)

10+ Year Member



Have problems with international chars like: ØÆÅ øæå ñ, etc,etc
when using them with mod_rewrite.

I use this rule:
RewriteRule ^/(.*)$ /index.php?$1 [L]

And this does not work either:
RewriteRule ^/(.*)$ /index.php?$1 [L, NE]

Turning it off and writing this manually works:
domain/index.php?q=bø

Using Rewrite, the URL looks like this:
domain/b%C3%B8

This is being displayed instead of 'ø' : 'bø'

This would be a correct encoding of 'ø' : '%F8'

Thanks in advance! I running out of ideas here.

This works on www.a9.com

Zyron

jdMorgan

2:18 pm on Feb 24, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



zyron,

Welcome to WebmasterWorld!

That's strange... You might want to look into the AddDefaultCharSet [httpd.apache.org] settings in Apache core.

Also, if you have Options Multiviews enabled, but are not actually using content-negotiation, then disable that option.

Jim

zyron

9:35 pm on Feb 24, 2005 (gmt 0)

10+ Year Member



Hello jd!

Thanks for your tip!
It solved my problem.. :D

I have the script running on two servers, one with apache 2, so I test it on the other - and there it was
working perfectly.

So I was looking for that setting you mentioned, the AddDefaultCharSet setting. And turn it off.
That seems to solve the problem.

And then I had the same problem on the main page, but after a long time of debugging I found out that I was missing the correct header - so after adding this code, it was working perfectly as well:

header( 'Content-Type: text/html; charset=iso-8859-1' );

Again, thanks for your help!