Ok so I have been storing wrong characters in my database in many rows, and under many columns and tables..
So this means that example “Æ” has turned out to be “æ”. I have fixed my server side code to show Æ and not to convert the encoding, but now it shows the actual “æ”.
So I will need to replace all my entrys that has “æ” to “æ”.
What are the best solution of doing this?
Can i do some operation direct in my database, that finds all “æ” and replaces with “æ” ?
Or maybe a php code?
Or should i code one my self, I have thought about grabbing all rows in a table, looping through them, replace and run update query for each and one of them..
I’m guessing going through all records and using
html_entity_decode()on them is your best bet. Otherwise, sure enough you could do an UPDATE that replaces specific strings in all rows, but it might not be all that easy if you want to replace all html entities.EDIT: Make sure not to call
html_entity_decode()on the same data twice… in most cases it will not matter, but there are circumstances in which it will.