Forum Moderators: phranque

Message Too Old, No Replies

charset declared in .htaccess?

         

keyplyr

8:57 pm on Dec 28, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month




Read about declaring charset in this thread [webmasterworld.com] using:

AddType 'text/html; charset=ISO-8859-1' html

But it is not working for me. Is there a module I need to turn on?

Thanks.

Longhaired Genius

9:31 pm on Dec 28, 2003 (gmt 0)

10+ Year Member



Try AddDefaultCharset [httpd.apache.org] (I haven't tried it)

keyplyr

9:40 pm on Dec 28, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



That's it :)

Mohamed_E

10:35 pm on Dec 28, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



That solves keyplyr's problem but does not explain why it works for me but not for him. Any suggestions?

I use the AddType in my .htaccess, have the charset absolutely nowhere in my html, and all validators accept my files, and the local header checker claims that the files are indeed iso-8859-1.

It seems reasonable to use the AddDefaultCharset instead (slightly more general), any reason not to?

keyplyr

12:05 am on Dec 29, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month




Mohamed_E, I added:

AddDefaultCharset On

to my .htaccess just above:

AddType 'text/html; charset=ISO-8859-1' html

Although my server has all mods enabled, because of their config, I usually need to turn them on at my domain. Your server config is obviously different.