0

We are currently migrating a legacy application from an old server to a new server. We're running into an issue where utf-8 encoded data was stored in a latin1 table.

On our old server, we had PHP 5.2 running, and this outputted the data as "Don’t", but the browser interpreted the data as "Don't" (we have content-type tag set to UTF-8). However, on our new server with PHP 5.4, it utf-8 encodes before outputted to the browser, causing the browser to interpret it as "Don’t".

Is there a way of correcting the data in the tables? If it helps, we still have access to our old server.

Deniz Zoeteman
  • 9,691
  • 26
  • 70
  • 97
  • 1
    1. Update your database to contain actual UTF-8 data according to http://stackoverflow.com/questions/20237474/strange-character-encoding-of-stored-data-old-script-is-showing-them-fine-new, 2. use [UTF-8 all the way through](http://stackoverflow.com/questions/279170/utf-8-all-the-way-through), 3. [don't `utf8_encode`](http://kunststube.net/encoding) – deceze Oct 07 '14 at 08:08
  • @deceze Thank you, the first question you linked had an answer that fixed our problem. – Deniz Zoeteman Oct 07 '14 at 09:07

0 Answers0