php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #50781 mb_strtolower issue with UTF-8 encoding
Submitted: 2010-01-16 21:26 UTC Modified: 2010-01-16 23:31 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: hlegius at gmail dot com Assigned:
Status: Not a bug Package: mbstring related
PHP Version: 5.2.12 OS: Windows 7
Private report: No CVE-ID: None
 [2010-01-16 21:26 UTC] hlegius at gmail dot com
Description:
------------
mb_strtolower issue when send a UTF-8 string.

Reproduce code:
---------------
<?php

echo mb_strtolower("H?LIO"); // returns: h&#65533;lio (error)
echo mb_strtoupper("h?lio"); // returns H?LIO (ok)

?>

Expected result:
----------------
<?php
// expected results

echo mb_strtolower("H?LIO"); // returns: h?lio
echo mb_strtoupper("h?lio"); // returns H?LIO

?>

Actual result:
--------------
<?php

echo mb_strtolower("H?LIO"); // returns: h&#65533;lio (error)
echo mb_strtoupper("h?lio"); // returns H?LIO (ok)

?>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-01-16 23:31 UTC] jani@php.net
Works fine for me, you're obviously doing something wrong. Like passing something else than expected, check your mbstring ini settings.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 13:01:29 2024 UTC