Bug #65371 [Fbk]: strftime() returns insufficient string
Edit report at https://bugs.php.net/bug.php?id=65371&edit=1
ID: 65371
Updated by: ab@php.net
Reported by: kenji dot uui at gmail dot com
Summary: strftime() returns insufficient string
Status: Feedback
Type: Bug
Package: Date/time related
Operating System: Windows
PHP Version: 5.5.1
Assigned To: ab
Block user comment: N
Private report: N
New Comment:
Ok, sadly I can't reproduce it neither with 5.4 nor with 5.5, got your expected result with CLI
and built-in server. There has to be something in your env causing this. Maybe you could try on some
other machine, with some other locale, etc? Also note that under apache the locale is not thread
safe (as apache under windows is threads based), there it might be possible because of it.
Thanks.
Previous Comments:
------------------------------------------------------------------------
[2014-01-07 05:21:23] kenji dot uui at gmail dot com
I've checked PHP 5.5.6, but not yet fixed. Thanks.
Results:
----------------
ã
ãE
e38182
e3818145
------------------------------------------------------------------------
[2014-01-02 13:52:06] ab@php.net
Please check with bug #65184, the issue your report looks very similar and is most likely already
fixed.
Thanks.
------------------------------------------------------------------------
[2013-08-01 11:42:42] kenji dot uui at gmail dot com
Description:
------------
strftime() breaks UTF-8 Japanese characters.
It worked fine in PHP 5.4.
Test script:
---------------
<?php
function p($str)
{
echo $str, '<br>';
echo strftime($str), '<br>';
echo bin2hex($str), '<br>';
echo bin2hex(strftime($str)), '<hr>';
}
setlocale(LC_ALL, 'C');
p('ã');
Expected result:
----------------
ã
ã
e38182
e38182
Actual result:
--------------
ã
ãE
e38182
e3818145
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=65371&edit=1
Thread (10 messages)