Search code examples
phpmysqlcharacter-encodingstring-decoding

How to fix corrupted encoded words using PHP


In one of my database table I found some corrupted words like:

Noël, japón, Świata

Which I later found should be as:

Noël, japón, świata

Anyone know how to convert them back to normal using PHP


Solution

  • Alternatively you can check if the problem is related to the character encoding using iconv - Check the php manual