My MySQL server doesn't recognize the difference between characters 'æ' and 'ae' while storing data to database and that creates some problems for me. My goal is to find a charset which recognizes the difference between those characters, and I found it (utfmb3), but it is going to be deprecated, and the new alternative (utfmb4) doesn't recognize those characters as different.
What I've tried:
set names 'utf8mb3';
select 'æ' = 'ae';
This select returns 0
(false), which means this charset sees these as different characters, and that's just what I need, but MySQL gives me a warning:
'utf8mb3' is deprecated and will be removed in a future release. Please use utf8mb4 instead
But when I do
set names 'utf8mb4';
select 'æ' = 'ae';
This select returns 1
, which means utf8mb4
sees these as the same characters, which is not good..
So, my dilema is, what charset to use?
If I use utfmb3
, it will be deprecated soon, that's no good. If I use utfmb4
, that won't work correctly.