Magento – Mass Fix for Bad Character Encoding

character encodingutf-8

I'm working on an upgrade project with an older Magento site, running an old version of Apache. This version of Apache fails to set a UTF-8 character encoding. Instead, the content type header omits an encoding type

Content-Type: text/html

and the browser is left to guess the mystery meat encoding. Firefox reports it as Windows-1252.

enter image description here

We've moved to a new web server, and this new web server is configured to send along the UTF-8 header

Content-Type: text/html; charset=UTF-8

So, we're doing the right thing here, joel is happy, but there's one problem: 5+ years of data entered under mystery meat encoding means there's all sorts of special characters in the database, and when they're served as UTF-8 this happens

enter image description here

For those with images off, that's "Lots of munged encoding".

Are there known solutions for this sort of problem, or am I looking at a lot of manual data scrubbing and/or switching the server back to ambiguous character encoding?

Best Answer

as far as i am seeing this question you have to repair the data. May be in the content there is some older version encoding thus the apache is not understanding that codes and thats why apache content type header omits an encoding type.

you have image over here showing Degree and Times, can you tell me Encode of that code in your database??? it is &deg??

Related Topic