Avatar

UTF-8 double encoding (Bugs)

by Mardor ⌂, Monday, March 12, 2018, 20:56 (2236 days ago) @ Micha

I updated today all the way up from a near-prehistoric 1.4.6b up to 2.4.8. All entries were double encoded afterwards. I solved the problem with a little Python script.

1. Export the database as SQL via phpMyAdmin. Rename it to x.sql.
2. Start this Python3 script:

with open("x.sql","r") as x, open("y.sql","w") as y:
    y.write(x.read().encode('raw_unicode_escape').decode('utf-8',errors="ignore"))


3. Delete all database tables and import y.sql


Complete thread:

 RSS Feed of thread