#50780 [Opn->Bgs]: strtolower UTF-8 encoding issue
| From: | jani@php.net | Date: | Sat, 16 Jan 2010 21:03:10 +0000 |
| Subject: | #50780 [Opn->Bgs]: strtolower UTF-8 encoding issue | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-146737@lists.php.net to get a copy of this message | ||
ID: 50780
Updated by: jani@php.net
Reported By: hlegius at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: Strings related
Operating System: Windows 7
PHP Version: 5.2.12
New Comment:
Yea, you're supposed to use mbstring for this stuff. Or iconv. PHP 6
will have support for unicode.
Previous Comments:
------------------------------------------------------------------------
[2010-01-16 20:56:00] hlegius at gmail dot com
Description:
------------
strtolower encoding problem in UTF-8 mode at Windows 7.
Reproduce code:
---------------
<?php
echo strtolower("HÉLIO"); // returns: h�lio (error)
echo strtoupper("hélio"); // returns HéLIO (ok)
?>
Expected result:
----------------
<?php
// expected results
echo strtolower("HÉLIO"); // returns: hÉlio
echo strtoupper("hélio"); // returns HéLIO
?>
Actual result:
--------------
<?php
echo strtolower("HÉLIO"); // returns: h�lio (error)
echo strtoupper("hélio"); // returns HéLIO (ok)
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50780&edit=1