D
D
Drum Kit2015-04-29 11:37:05
MySQL
Drum Kit, 2015-04-29 11:37:05

How to convert database from latin1 to utf-8?

I have a large database and latin1 framing is based on it. I tried many ways
ALTER TABLE `content`.`part1` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
iconv('utf-8', 'latin1', $row['price']);
mb_convert_encoding($str, 'latin1','utf-8');
but can't convert properly

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail Tikhonin, 2015-04-29
@arayik

Dump in one encoding, change the encoding in the dump file and import back into mysql. It is only desirable to another database so that the data is not lost if something happens.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question