Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Character Encoding mismatch


Roaddoctor

Recommended Posts

When I run my homepage thru the w3c validator, I get one error of significance:

 

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.

 

Can someone explain this a bit to me?

I've searched the forums and only find discussion of Character Encoding mismatch in a paypal ipn thread which is not relevent.

 

 

Just a point in the right direction should get me going

 

Thank you!

-Dave

Link to comment
Share on other sites

When I run my homepage thru the w3c validator, I get one error of significance:

The utf-8 header is sent out by the Apache server (and that is what browsers will use for displaying the site). If you can add .htaccess to your document root and the server is allowed to process it you can change the heading (something with AddEncoding I think).

 

If you are not on Apache I have no clue how to change it.

Link to comment
Share on other sites

Thank you for the reply. I am on Apache and use htaccess

 

If I understand, the server is utf-8 and osc is iso-8859-1?

 

or has something I've added to osc triggered the mismatch? Which should it be, utf-8 or iso-8859-1?

Is there something in the osc configuration or metatags contribution I can do that would straighten things out? that was my first thought.

 

sorry for the newbness, this is a new topic for me

-Dave

Link to comment
Share on other sites

If I understand, the server is utf-8 and osc is iso-8859-1?

 

or has something I've added to osc triggered the mismatch? Which should it be, utf-8 or iso-8859-1?

If you use English iso-8859-1 is the best option IMHO. The option is called AddDefaultCharset by the way. More info if you follow that link.

Link to comment
Share on other sites

If you use English iso-8859-1 is the best option IMHO. The option is called AddDefaultCharset by the way. More info if you follow that link.

 

Jan than you very much for the pointers. Since my site is multilanguage (English, Spanish, German) I opted to take the leap to UTF-8 throughout the site. Is there any reason to NOT do this??

 

In /catalog/includes/languages/yourlanguage.php/ there is this setting:

 

// charset for web pages and emails
// define('CHARSET', 'iso-8859-1');
define('CHARSET', 'utf-8');

 

after making the change the site seems fine, and I need to test if it effected outbound emails in any negative way... Has anyone else made this change and were there any negative consequences?

-Dave

Link to comment
Share on other sites

Since my site is multilanguage (English, Spanish, German) I opted to take the leap to UTF-8 throughout the site. Is there any reason to NOT do this??

I truly have no idea what will come up. I admin an English language site that is in iso-8859-1 but of which the mysql database is utf-8 and I noticed that certain characters like ö cannot be imported in a local database that uses iso-8859-1 without getting malformed. Since it is a rare occurence for that site to have those characters in it I never looked into it. I'm not sure if the first 255 characters of iso-8859-1 are the same in utf-8. If there are differences, I'm sure you will see them sooner or later :)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...