Bug #74678 [Com]: mb_strtoupper() and mb_strtolower() are compleltly broken

From: Date: Wed, 31 May 2017 11:06:32 +0000
Subject: Bug #74678 [Com]: mb_strtoupper() and mb_strtolower() are compleltly broken
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-209314@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74678&edit=1 ID: 74678 Comment by: subjective@php.net Reported by: spam2 at rhsoft dot net Summary: mb_strtoupper() and mb_strtolower() are compleltly broken Status: Open Type: Bug Package: mbstring related PHP Version: 7.1Git-2017-05-31 (Git) Block user comment: N Private report: N New Comment: Have you checked the value of mb_internal_encoding()? You do not provide an encoding so it depends on the configuration. I suggest to provide the encoding argument to the function calls. $mb_test = mb_strtoupper($mb_test, 'UTF-8'); Previous Comments: ------------------------------------------------------------------------ [2017-05-31 10:55:21] spam2 at rhsoft dot net Description: ------------ bad enough that mb_strtoupper() don't work at all but that mb_strtolower() destroys the string is a no-go [harry@rh:/downloads]$ cat test.php <?php $mb_test = utf8_encode(chr(252) . chr(246) . chr(228)); echo "$mb_test\n"; $mb_test = mb_strtoupper($mb_test); echo "$mb_test\n"; $mb_test = mb_strtolower($mb_test); echo "$mb_test\n"; [harry@rh:/downloads]$ php test.php üöä üöä ������ ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=74678&edit=1

« previous php.bugs (#209314) next »