php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #50780 strtolower UTF-8 encoding issue
Submitted: 2010-01-16 20:56 UTC Modified: 2010-01-16 21:09 UTC
From: hlegius at gmail dot com Assigned:
Status: Not a bug Package: Strings related
PHP Version: 5.2.12 OS: Windows 7
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: hlegius at gmail dot com
New email:
PHP Version: OS:

 

 [2010-01-16 20:56 UTC] 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&#65533;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&#65533;lio (error)
echo 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 21:03 UTC] jani@php.net
Yea, you're supposed to use mbstring for this stuff. Or iconv. PHP 6 will have support for unicode.
 [2010-01-16 21:09 UTC] hlegius at gmail dot com
Yeah, I can, but it is a PHP bug, anyway ! In older versions - 5.2.6 this does not happen.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 00:01:30 2024 UTC