#49232 [Opn->Bgs]: strtolower and utf-8 charaters with diacritics

From: Date: Thu, 13 Aug 2009 08:46:34 +0000
Subject: #49232 [Opn->Bgs]: strtolower and utf-8 charaters with diacritics
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-141007@lists.php.net to get a copy of this message
ID: 49232 Updated by: jani@php.net Reported By: svecpetr at email dot cz -Status: Open +Status: Bogus -Bug Type: Recode related +Bug Type: Strings related Operating System: linux PHP Version: 5.3.0 New Comment: PHP 6 will have unicode support. Until that, use mbstring. Previous Comments: ------------------------------------------------------------------------ [2009-08-12 11:31:23] sjoerd-php at linuxonly dot nl Thank you for your bug report. You can use mb_strtolower() to solve your problem. ------------------------------------------------------------------------ [2009-08-12 10:41:42] svecpetr at email dot cz Description: ------------ function strtolower doesn't work good when try to lower Czech characters (with diacritics) written in utf-8 Reproduce code: --------------- try this setlocale(LC_ALL, "cs_CZ.utf8"); $str = "ÉÌŠÈØŽÝÁÍÉÓύÚÙ"; echo strtolower($str); // correct output is: // éìšèøžýáíéóïúù // but you will see something else Expected result: ---------------- correct function Actual result: -------------- see example above ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=49232&edit=1

« previous php.bugs (#141007) next »