#19257 [NEW]: strtolower & strtoupper does not work for UTF-8 strings
From: gamid@isayev.net
Operating system: Linux
PHP version: 4.2.2
PHP Bug Type: Strings related
Bug description: strtolower & strtoupper does not work for UTF-8 strings
Functions strtolower() & strtoupper() does not change UTF-8 strings. I try
Russian (0x042F, 0x044F) and German (0x00DC, 0x00FC) characters.
Example:
<?
$str = "testï";
$loc = "UTF-8";
putenv("LANG=$loc");
$loc = setlocale(LC_ALL, $loc);
$strU = strtoupper($str);
$strL = strtolower($str);
?>
<PRE>
loc = '<? echo $loc; ?>'
str = '<? echo $str; ?>'
strU = '<? echo $strU; ?>'
strL = '<? echo $strL; ?>'
</PRE>
--
Edit bug report at http://bugs.php.net/?id=19257&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=19257&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=19257&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=19257&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=19257&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=19257&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=19257&r=support
Expected behavior: http://bugs.php.net/fix.php?id=19257&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=19257&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=19257&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=19257&r=globals
Thread (18 messages)
- gamid at isayev dot net
- sniper@php.net#19257 [Opn->Bgs]: strtolower & strtoupper does not work for UTF-8 strings
- gamid at isayev dot net#19257 [Bgs]: strtolower & strtoupper does not work for UTF-8 strings
- sniper@php.net#19257 [Bgs]: strtolower & strtoupper does not work for UTF-8 strings
- gamid at isayev dot net#19257 [Bgs]: strtolower & strtoupper does not work for UTF-8 strings
- gamid at isayev dot net#19257 [Bgs]: strtolower & strtoupper does not work for UTF-8 strings
- gamid at isayev dot net#19257 [Bgs->Opn]: strtolower & strtoupper does not work for UTF-8 strings
- sniper@php.net#19257 [Opn->Fbk]: strtolower & strtoupper does not work for UTF-8 strings
- gamid at isayev dot net#19257 [Fbk->Opn]: strtolower & strtoupper does not work for UTF-8 strings
- sniper@php.net#19257 [Opn->Fbk]: strtolower & strtoupper does not work for UTF-8 strings
- gamid at isayev dot net#19257 [Fbk->Opn]: strtolower & strtoupper does not work for UTF-8 strings
- sniper@php.net#19257 [Opn->Bgs]: strtolower & strtoupper does not work for UTF-8 strings
- gamid at isayev dot net#19257 [Bgs]: strtolower & strtoupper does not work for UTF-8 strings
- wez@php.net#19257 [Bgs]: strtolower & strtoupper does not work for UTF-8 strings
- wez@php.net#19257 [Bgs]: strtolower & strtoupper does not work for UTF-8 strings
- gamid at isayev dot net#19257 [Bgs]: strtolower & strtoupper does not work for UTF-8 strings
- wez@php.net#19257 [Bgs->Fbk]: strtolower & strtoupper does not work for UTF-8 strings
- gamid at isayev dot net#19257 [Fbk->Csd]: strtolower & strtoupper does not work for UTF-8 strings