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

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.051 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.