I have problem with MySQL chinesse marks from latin to utf-8 conversion.
I set all variables
ALTER DATABASE mydb CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
SET CHARACTER SET utf8mb4;
SET NAMES utf8mb4;
after that i execute script :
select id,convert(binary convert(`address` using latin1) using utf8mb4),address from users where id = 11111;
and i receive good results:
'11111', '一二 三四五', '一二 三四五'
so now i want to update this row so i execute:
UPDATE `users` SET `address` = convert(binary convert(`address` using latin1) using utf8mb4) where id = 11111;
but in output i get information:
1 row(s) affected, 1 warning(s): 1366 Incorrect string value: '\xE4\xB8\x80\xE4\xBA\x8C...' for column 'address' at row 1 Rows matched: 1 Changed: 1 Warnings: 1
and after that i select address for that user i get : '?????????'
Please help,
Regards