I have a "keyword" column that contains German, Spanish, French specific characters but appear incorrectly. How can I rectify it?
E.g. fähre
appears whereas I need it to show fähre
When checking the CHARACTER_SET_NAME
and COLLATION_NAME
I get utf8mb4
and utf8mb4_general_ci
respectively.
I've tried:
ALTER TABLE gsSearchAnalyticsTest CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci;
ALTER TABLE gsSearchAnalyticsTest CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CONVERT(CAST(keyword as BINARY) USING utf8mb4) as keyword_new
CONVERT(keyword USING utf8mb4) as keyword_new
- Creating a new table and using
CHARACTER SET utf8mb4
andCOLLATE utf8mb4_unicode_ci
(this gives me aSpecified key was too long; max key length is 767 bytes
error even though biggestVARCHAR
isVARCHAR(255)
)
The only thing that works is this:
REPLACE(keyword, 'ä', 'ä') as keyword_new
but surely there is an easier way rather than doing a replace for all these type of characters?
If it's too much work in MySQL, then open to solutions using Python where efficient?