Answer the question
In order to leave comments, you need to log in
Convert base to UTF8 partially
Good day!
There is a MySQL database, several tables. Previously, the cron script parsed some data and wrote it to the database as is - in cp1251. Later, the script was redesigned, now it overtakes the text in utf-8 before writing. Actually, now the database is in such a state that half of the database is in utf-8 and is displayed normally, and the old records are in cp1251.
Can anyone tell me how to convert old records from cp1251 to utf-8?
Answer the question
In order to leave comments, you need to log in
Well, well, apparently in 3 stages:
1 - upload data up to a certain point, for example, by date. You can use the same mysqldump, and then cut off part of the table file;
2 - convert to utf-8, the same iconv;
3 - update the table. Either by writing via SQL UPDATE, or merge back into the table file and drive it entirely into the database. The 2nd option is possible only if this table does not change constantly, i.e. you can freeze it for a minute.
Maybe try Sypex Dumper? after export, import by specifying the encoding and checking the checkbox - encoding correction? I'm not sure, but I treated the wrong encodings like this
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question