Character encoding sent from server...

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Character encoding sent from server...

Post by Luke »

When i validate my page, I get this error:
W3C Validator wrote:Character Encoding mismatch!

The character encoding specified in the HTTP header ( utf-8 ) is different from the value in the <meta> element (iso-8859-1). I will use the value from the HTTP header ( utf-8 ) for this validation.
Why is the http header sending utf-8? I imagine I could change this?
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

Actually... (hope this isn't considered a bump as it's an entirely different question)

What are the possible implications of setting the character set as utf-8? Is there any reason why I shouldn't?
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

take a look at http://de2.php.net/ini.core#ini.default-charset and http://de2.php.net/ini.core#ini.default-mimetype
The Ninja Space Goat wrote:What are the possible implications of setting the character set as utf-8? Is there any reason why I shouldn't?
If your document is utf-8 then there's no problem ;)
choppsta
Forum Contributor
Posts: 114
Joined: Thu Jul 03, 2003 11:11 am

Post by choppsta »

If you're using Apache you can use the following in your httpd.conf or an .htaccess file.

Code: Select all

AddDefaultCharset ISO-8859-1
or

Code: Select all

AddDefaultCharset UTF-8
To be honest i've got pretty confused by encodings myself. I did play around with: http://uk2.php.net/manual/en/function.m ... coding.php and related functions but I didn't really fully understand it.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

Well, I intend to do some research on it tomorrow, but in the meantime, if anybody has any reason why I should or should not use utf-8, let me know.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

Anybody? I'm just wondering if there is any danger or insecurities or any sort of problem at all with me setting utf-8
Post Reply