Rescue damaged characters in the database

I just imported a huge MySQL database. Most of the fields are latin1_swedish_ci and they contain a lot of broken lines.

eg. Cavit Y�r�½Ãà               Â,

I am trying to find a solution to fix these glitches with PHP as I know a little about all of this. I was playing the utf8_ (en | de), iconv code unsuccessfully.

Please, help!!! Because this is a burden of corruption.

UPDATE: Reimported as latin 1 and now has a higher Cavit Y�r�kl�. So it is definitely different, but sql itself seems to be corrupted.


source to share

2 answers

Yes, it is using the wrong encoding. Check for how to fix it. You just need to figure out what encoding it is in now and what you want it to be, and then you can convert. Or configure db to match the encoding of the imported data (if this is an option)



I'll first make a copy of the db dump and then try to use iconv - and I know you said you tried, but there are many, many character encoding combinations you can try - I once had to fix some corrupted Russian Cyrillic data - then, what ended up working was giving the output value "UTF-8 // TRANSLIT" - I'd try every combination you can remember, but keep a copy of the original.



All Articles