Bug #76696 [Opn->Nab]: Lower-case à is capitalized as SS instead of áº
| From: | nikic@php.net | Date: | Thu, 02 Aug 2018 18:55:02 +0000 |
| Subject: | Bug #76696 [Opn->Nab]: Lower-case à is capitalized as SS instead of Ạ| ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-216543@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=76696&edit=1
ID: 76696
Updated by: nikic@php.net
Reported by: tim dot eulitz at gmail dot com
Summary: Lower-case à is capitalized as SS instead of áº
-Status: Open
+Status: Not a bug
Type: Bug
Package: mbstring related
PHP Version: 7.3.0beta1
Block user comment: N
Private report: N
New Comment:
We're following the Unicode specification here, see in particular sections 3.13, 4.2 and 5.18
of the standard, as well as the SpecialCasing data for this particular rule. Just like everything
else relating to Unicode, case mapping is hard, there are often multiple possible choices of what
could be done, and it's ultimately necessary to choose one as the default behavior.
As a German myself, I'd say the decision of the Unicode consortium to capitalize
"Ã" to "SS" was and continues to be the correct one from the perspective of
practical usage.
I also think that this is not something that Unicode will be able to change in the future (even if
they wanted to), because such a change would make à and à a case pair, which they are
currently not, which would violate the case pair stability policy.
Previous Comments:
------------------------------------------------------------------------
[2018-08-02 17:48:21] cmb@php.net
It seems to me that Unicode is not up to date[1].
[1] <http://unicode.org/faq/casemap_charprop.html#11>
------------------------------------------------------------------------
[2018-08-02 16:26:59] tim dot eulitz at gmail dot com
Description:
------------
I have just read the changelog for PHP 7.3beta1 and noticed this example in the mb_strtoupper
changes:
>Support for full case-mapping and case-folding has been added. Unlike simple case-mapping, full
>case-mapping may change the length of the string. For example:
>
>mb_strtoupper("StraÃe")
>
>// Produces STRAÃE on PHP 7.2
>// Produces STRASSE on PHP 7.3"
The example provided is actually rather questionable and possibly wrong, since Capital Ạhas
been added to standard German in 2017. So instead of either "STRAÃE" or
"STRASSE", the correct uppercase version should likely be "STRAáºE"
mb_strtolower('áº') correctly lower-cases the string to 'Ã', so this
would be consistent behavior in my opinion and would make the behavior more future-proof.
Quick Wikipedia reference: https://en.wikipedia.org/wiki/Capital_%E1%BA%9E
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=76696&edit=1