Bug #65371 [Asn]: strftime() returns insufficient string
| From: | kenji dot uui at gmail dot com | Date: | Thu, 22 Jan 2015 22:31:46 +0000 |
| Subject: | Bug #65371 [Asn]: strftime() returns insufficient string | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-190156@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=65371&edit=1
ID: 65371
User updated by: kenji dot uui at gmail dot com
Reported by: kenji dot uui at gmail dot com
Summary: strftime() returns insufficient string
Status: Assigned
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:
I hear this bug is because of VC11 strftime.
Workround is below:
function strftime_win($str)
{
$str = mb_convert_encoding($str, 'CP932', 'UTF-8');
return mb_convert_encoding(strftime($str), 'UTF-8', 'CP932');
}
Previous Comments:
------------------------------------------------------------------------
[2015-01-22 21:36:48] kenji dot uui at gmail dot com
I tested on PHP 5.5.21. Not fixed yet.
Results:
----------------
ã
ãE
e38182
e3818145
------------------------------------------------------------------------
[2015-01-22 12:01:18] ab@php.net
Could you please revisit this? There was a lot of locale fixes recently, you could check 5.5.21 or
just some recent 5.5 on windows.php.net .
Thanks.
------------------------------------------------------------------------
[2014-01-11 13:39:27] kenji dot uui at gmail dot com
I found Windows system locale affects the result.
I changed it to English(US), then I got expected result.
The problem occurs in Japanese locale.
------------------------------------------------------------------------
[2014-01-09 12:36:10] ab@php.net
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.
------------------------------------------------------------------------
[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
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=65371
--
Edit this bug report at https://bugs.php.net/bug.php?id=65371&edit=1