php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77555 Why does mb_strtoupper change 'ß' to 'ss' in words like 'groß'?
Submitted: 2019-02-01 10:29 UTC Modified: 2019-02-01 10:35 UTC
From: dirk dot gerigk at atraveo dot com Assigned:
Status: Duplicate Package: *Unicode Issues
PHP Version: 7.3.1 OS: Windows 10
Private report: No CVE-ID: None
 [2019-02-01 10:29 UTC] dirk dot gerigk at atraveo dot com
Description:
------------
I try to understand why this was implemented.

When you do 
print mb_strtolower("Groẞ"); it becomes 'groß' 
UPPER CASE ẞ becomes LOWER CASE ß

print mb_strtolower("Groß"); will be 'groß'
LOWER CASE ß unchanged

print mb_strupper("groẞ"); will be 'GROẞ'
UPPER CASE ẞ stays unchanged!

But print mb_strtoupper("groß"); becomes 'GROSS'

Why does it not become UPPER CASE ẞ?

Not all words in german can be changed in that way and should only changed if needed.

UPPER CASE ẞ is offical see https://en.wikipedia.org/wiki/Capital_%E1%BA%9E
 

Test script:
---------------
print mb_strtoupper("groß");

Expected result:
----------------
GROẞ

Actual result:
--------------
GROSS

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-02-01 10:35 UTC] nikic@php.net
-Status: Open +Status: Duplicate
 [2019-02-01 10:35 UTC] nikic@php.net
Duplicate of bug #76696.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sun Jan 26 09:01:24 2020 UTC