Bug #64699 [Com]: is_dir() is inaccurate result on Windows with japanese locale.
Edit report at https://bugs.php.net/bug.php?id=64699&edit=1
ID: 64699
Comment by: severnuri at yahoo dot com
Reported by: sharkpp at gmail dot com
Summary: is_dir() is inaccurate result on Windows with
japanese locale.
Status: Open
Type: Bug
Package: Filesystem function related
Operating System: Windows
PHP Version: 5.4.14
Block user comment: N
Private report: N
New Comment:
Similar problem with directory names having Turkish letters ÅÅıİÄÄ
using Windows 8.1 Pro english
I was calling is_dir() on entries returned by readdir() in a script, and noticed that readdir() was
transliterating names containing such letters, hence is_dir() was always failing.
I assume this is the same issue so did not open another bug. Please advise if I should file a new
bug for this.
Previous Comments:
------------------------------------------------------------------------
[2013-08-06 01:48:50] ku at digitaldolphins dot jp
Ah, sorry...
---
Insert the prefix: wfio://
is_dir("wfio://C:/")
is_dir("wfio://C:\\")
---
It will list entries in Shift-JIS charset, with Japanese Windows.
php.exe -r "print_r(scandir('C:/'));"
---
It will list entries in UTF8.
php.exe -r "print_r(scandir('wfio://C:/'));"
---
"wfio://" may support:
fopen, fwrite, fread, stat, fclose,
opendir, readdir, closedir,
rename, copy, unlink,
mkdir, rmdir.
Here is first post about php-wfio.
http://news.php.net/php.windows/30987
Thanks
------------------------------------------------------------------------
[2013-07-30 16:48:43] ab@php.net
Related To: Bug #65358
------------------------------------------------------------------------
[2013-05-25 04:28:05] sharkpp at gmail dot com
Thank you.
I hope a major version.
Incidentally, php-wfio is not work.
Because is_dir() is not implemented.
------------------------------------------------------------------------
[2013-05-07 06:54:57] pajoye@php.net
For the record, it is not that it won't be fixed but can't be fixed at this stage
but in a major version. Not only PHP's code and not only for file stream wrapper.
------------------------------------------------------------------------
[2013-05-07 06:36:39] ku at digitaldolphins dot jp
Hi.
It is known problem. And it won't be fixed.
If you need a patch, check my one at:
https://bugs.php.net/bug.php?id=61315
Or you can try php-wfio extension instead.
https://code.google.com/p/php-wfio/
It needs to be built manually with step by step instruction.
https://wiki.php.net/internals/windows/stepbystepbuild
Try at your own risk!
Thanks
kenji uno.
------------------------------------------------------------------------
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=64699
--
Edit this bug report at https://bugs.php.net/bug.php?id=64699&edit=1
Thread (7 messages)