php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63593 scandir return "?" in place of unicode letter in Windows httpd.
Submitted: 2012-11-23 23:06 UTC Modified: 2012-11-24 13:05 UTC
From: john dot peterson10 at gmail dot com Assigned:
Status: Duplicate Package: *Unicode Issues
PHP Version: 5.5Git-2012-11-23 (snap) OS: Windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: john dot peterson10 at gmail dot com
New email:
PHP Version: OS:

 

 [2012-11-23 23:06 UTC] john dot peterson10 at gmail dot com
Description:
------------
Reproduce

Program
httpd-2.2.22-win32-x86-openssl-0.9.8t.msi
php-5.5-ts-windows-vc9-x86-r64788e3.zip

Config
httpd-2.2.22-win32-x86-openssl-0.9.8t.msi/program files/Apache Software 
Foundation/Apache2.2/conf/original/httpd.conf.in
php-5.5-ts-windows-vc9-x86-r64788e3.zip/php.ini-development

Command
# cd `httpd ServerRoot`
touch ファイル
curl -v 'http://server/test.php'	# return "????"
php test.php						# return "ファイル"

Test script:
---------------
<?php header("content-type: text/plain; charset=utf-8"); print_r(scandir(".")); ?>

Expected result:
----------------
See above.

Actual result:
--------------
See above.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-11-24 11:56 UTC] pajoye@php.net
-Status: Open +Status: Duplicate
 [2012-11-24 11:56 UTC] pajoye@php.net
there is no Unicode support for file system functions in PHP. There is already a 
feature request for that > mark as duplicated.
 [2012-11-24 11:59 UTC] john dot peterson10 at gmail dot com
What is the duplicate ID?
 [2012-11-24 12:20 UTC] pajoye@php.net
I don't have it at hand but if you search for 'windows file unicode', you will 
find a couple with work around (tricky but possible).
 [2012-11-24 12:34 UTC] john dot peterson10 at gmail dot com
Please comment on the fact that CLI and httpd return different data.

Please post the relevant source file and line.
 [2012-11-24 12:42 UTC] john dot peterson10 at gmail dot com
php test.php				# return "????"
%cygwin%/bin/php test.php		# return "ファイル"
 [2012-11-24 12:56 UTC] pajoye@php.net
Different runtime encoding. Nothing wrong here. Also cygwin is total different 
story from a shell point of view.
 [2012-11-24 12:58 UTC] john dot peterson10 at gmail dot com
"Please post the relevant source file and line."
 [2012-11-24 13:05 UTC] pajoye@php.net
No, sorry. I do not have the time to give all the details again. Look at the other 
bugs, explanation are in there. You have to convert your filenames to the runtime 
encoding, given that you know it.

Changing the core to support wild char APIs are not yet planed for 5.5.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon Jan 27 19:01:24 2020 UTC