Bug #72291 Lower / upper ß
Submitted: 9 Apr 2014 13:49 Modified: 11 Apr 2018 10:50
Reporter: Federico Razzoli Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Charsets Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: CPU Architecture:Any

[9 Apr 2014 13:49] Federico Razzoli
Description:
It seems that UPPER() and LOWER() have no effect on ß and ẞ characters (they are not the same: the latter is uppercase). I suppose this is a design choice, because capital ẞ does not exist in German alphabet.

However, IMO, the way PHP handles these chars is much better:
* strotoupper('ß') has no effect (output is lowercase)
* strtolower('ẞ') produces a lowercase ß

Why is it better? Because UPPER(sentence) is ok, but LOWER(sentence) produces a lowercase output with a non-existing uppercase letter instead of ß!

NOTE: I only tested UTF8.

How to repeat:
SELECT LOWER(_utf8'ẞ');
[10 Apr 2014 8:01] MySQL Verification Team
Hello Federico,

Thank you for the report.
Verified as described with latest 5.6 GA build.

Thanks,
Umesh
[11 Apr 2018 10:50] Erlend Dahl
The utf8mb4 character set (introduced in 8.0.1) doesn't have this problem.
[14 Nov 2020 2:52] Jacek Pawlowski
There is another twist.  UPPER(ß) should/could be converted to `SS` - this is what Python does.  I discovered this comparing results for SHA function in MySQL and Python