php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #12739 strtolower/strtoupper and special characters
Submitted: 2001-08-14 08:49 UTC Modified: 2002-12-21 10:32 UTC
From: stefan dot priebsch at e-novative dot de Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.0.6 OS: all
Private report: No CVE-ID: None
 [2001-08-14 08:49 UTC] stefan dot priebsch at e-novative dot de
Special characters are not converted by strtolower/strtoupper unless I set the appropriate locale.

However, in an international website the user interface language might be English, whereas the user still enters German data with umlauts. In this case it is not really possible to switch locale (as it is not known up front which language the user enters - might as well be his Swedish name) to correctly convert all special characters.

I suggest extending strtoupper and strtolower in a way that ALL special characters (at least all those appearing in the Western Standard charset) are ALWAYS converted correctly.

That can't do any bad because the user (programmer) would always except the functions just to upper/lowercase ALL alphabetic characters, special characters included.

If the performance impact on strtoupper/strtolower is too big, it would always be possible to introduce special functions for that or have the user give a reference to the character set that the input is ... I guess your ideas are way better than mine here.

In my opinion this would be a major improvement to PHP's international capabilities.

Keep up the good work, anyway!

Cheers,

Steve

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-21 10:32 UTC] moriyoshi@php.net
Since 4.3.0, you can use mb_strtoupper(), mb_strtolower(), or mb_convert_case() for that purpose.

Closing...

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 10 19:01:34 2024 UTC