I am working in phpmyadmin where I have Arabic values in name columns like
کلب الرقيّة علی العزیزبوریï
And I want to convert them to proper form.
I tried these queries and it converted most of the records in the table
ALTER DATABASE alfeker_book CHARACTER SET utf8 COLLATE utf8_unicode_ci;
ALTER TABLE guestbook CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;
UPDATE guestbook SET name = CONVERT(BINARY CONVERT(name USING latin1) USING utf8mb4);
And also tried
UPDATE guestbook SET name = CONVERT(BINARY CONVERT(name USING binary) USING utf8mb4);
but few of them remain unchanged and give this error
#1977 - Cannot convert 'utf8' character 0xD8AD to 'latin1'
I also tried this query:
SELECT id,name, CONVERT(BINARY CONVERT(name USING latin1) USING utf8mb4) AS converted_name FROM guestbook;
Which works fine and show the non converted characters perfectly. But when I use the update query it doesn't work.