#39261 [NEW]: strftime chops characters with utf-8

From: Date: Thu, 26 Oct 2006 02:16:43 +0000
Subject: #39261 [NEW]: strftime chops characters with utf-8
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-103993@lists.php.net to get a copy of this message
From: mehmetyucel at gmail dot com Operating system: MS Windows 2003 ES/Fedora Core 5 PHP version: 5.1.6 PHP Bug Type: Output Control Bug description: strftime chops characters with utf-8 Description: ------------ If the localization that is set by setlocale has non ISO-8859-1 characters strftime destroys these. Reproducable on both Fedora Core 5 and Windows 2003 Enterprise Server tested for 2 languages (Spanish / Turkish) Reproduce code: --------------- header('Content-Type: text/html; charset=utf-8'); setlocale(LC_TIME,"spanish"); echo strftime("%d %B %Y %A",strtotime("2006-10-28"))."<br>"; setlocale(LC_TIME,"turkish"); echo strftime("%d %B %Y %A",strtotime("2006-10-26"))."<br>"; echo strftime("%d %B %Y %A",strtotime("2006-10-25"))."<br>"; Expected result: ---------------- 28 octubre 2006 sábado 26 Ekim 2006 Per&#351;embe 25 Ekim 2006 Çar&#351;amba Actual result: -------------- 28 octubre 2006 s&#6305;do 26 Ekim 2006 Per?r>25 Ekim 2006 &#481;r?r> -- Edit bug report at http://bugs.php.net/?id=39261&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39261&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39261&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39261&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=39261&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=39261&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=39261&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=39261&r=needscript Try newer version: http://bugs.php.net/fix.php?id=39261&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=39261&r=support Expected behavior: http://bugs.php.net/fix.php?id=39261&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=39261&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=39261&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=39261&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39261&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=39261&r=dst IIS Stability: http://bugs.php.net/fix.php?id=39261&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=39261&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=39261&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=39261&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=39261&r=mysqlcfg

« previous php.bugs (#103993) next »