0

Okay, something went wrong in our database and now all the content from Chinese, Turkish etc. language is messed up (wrong characters). I'm trying to create a PHP script to convert it. Yes, SET NAMES utf8 is executed, everything is utf8mb4_general_ci and the PDO connection has charset utf8.

For example, we got the following text:

Bizimle iletişime geçin

Which is supposed to be:

Bizimle iletişime geçin

Now, if I display the output from the database, it displays the first line what we got in our database (Bizimle iletişime geçin). Then, I use this line:

die(utf8_decode('Bizimle iletişime geçin'));

The output of it is:

Bizimle ileti�?ime geçin

So the ç gets decoded correctly but the ş doesn't.

I tried going to an online utf8-decoder (https://software.hixie.ch/utilities/cgi/unicode-decoder/utf8-decoder) and if I try to decode ÅŸ it does show the ş correctly.

Joshua Bakker
  • 2,288
  • 3
  • 30
  • 63

0 Answers0