#39261 [Fbk->Opn]: strftime chops characters with utf-8
ID: 39261 User updated by: mehmetyucel at gmail dot com Reported By: mehmetyucel at gmail dot com -Status: Feedback +Status: Open Bug Type: Output Control Operating System: MS Windows 2003 ES/Fedora Core 5 PHP Version: 5.1.6 New Comment: 5.2 snapshot solved the issue on linux, but problem still exists for windows. Somehow setlocale sets output encoding of strftime. Following works as a temporary solution for window env. iconv("ISO-8859-9","UTF-8",strftime("%d %B %Y %A",strtotime("2006-10-26"))); Previous Comments: [2006-10-26 09:17:01] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.2-win32-latest.zip -------- [2006-10-26 02:16:43] mehmetyucel at gmail dot com 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")).""; setlocale(LC_TIME,"turkish"); echo strftime("%d %B %Y %A",strtotime("2006-10-26")).""; echo strftime("%d %B %Y %A",strtotime("2006-10-25")).""; Expected result: 28 octubre 2006 sábado 26 Ekim 2006 Perşembe 25 Ekim 2006 Çarşamba Actual result: -- 28 octubre 2006 sᢡdo 26 Ekim 2006 Per?r>25 Ekim 2006 ǡr?r> -- Edit this bug report at http://bugs.php.net/?id=39261&edit=1
#39261 [NEW]: strftime chops characters with utf-8
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")).""; setlocale(LC_TIME,"turkish"); echo strftime("%d %B %Y %A",strtotime("2006-10-26")).""; echo strftime("%d %B %Y %A",strtotime("2006-10-25")).""; Expected result: 28 octubre 2006 sábado 26 Ekim 2006 Perşembe 25 Ekim 2006 Çarşamba Actual result: -- 28 octubre 2006 sᢡdo 26 Ekim 2006 Per?r>25 Ekim 2006 ǡ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