#41199 [Opn->WFx]: scandir etc cannot read Chinese file/folder name

From: Date: Thu, 26 Apr 2007 09:06:07 +0000
Subject: #41199 [Opn->WFx]: scandir etc cannot read Chinese file/folder name
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-111923@lists.php.net to get a copy of this message
 ID:               41199
 Updated by:       tony2001@php.net
 Reported By:      n00bp00ns at gmail dot com
-Status:           Open
+Status:           Wont fix
 Bug Type:         Directory function related
 Operating System: Vista Home Premium
 PHP Version:      5.2.1
 New Comment:

You have to wait for PHP6 if you want decent Unicode support.


Previous Comments:
------------------------------------------------------------------------

[2007-04-26 08:55:32] n00bp00ns at gmail dot com

Description:
------------
The directory functions, namely:

opendir();
readdir();
scandir();

only reads english filenames/folders and not chinese and possibly other
languages

Ref: http://bugs.php.net/bug.php?id=30195

Reproduce code:
---------------
<?php

$path = "C:/"; // path to file on windows pc
$dir = opendir($path);

while (false !== ($f = readdir($dir)) )
{
	echo $f . "<br />";
}

?>

Expected result:
----------------
Whatever filenames that is in that folder I requested for

Actual result:
--------------
If there are chinese filenames, it'll display as question marks. Not
sure about others. I tried reencoding/sending the proper headers too.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=41199&edit=1


Thread (3 messages)

« previous php.bugs (#111923) next »