php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42397 problem with opening russian name files/directories
Submitted: 2007-08-23 13:04 UTC Modified: 2007-08-24 10:31 UTC
From: norraxx at seznam dot cz Assigned:
Status: Not a bug Package: Directory function related
PHP Version: 5.2.3 OS: windows XP Professional (cz)
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: norraxx at seznam dot cz
New email:
PHP Version: OS:

 

 [2007-08-23 13:04 UTC] norraxx at seznam dot cz
Description:
------------
functions: opendir, readdir, scandir etc... 
1. can`t read/open russian named directories.
2. question marks are returned as a name of file while reading dir.
3. file exists write when create russian name directory

Reproduce code:
---------------
<?php  
  mkdir('./?????????????'); // there is russian named dir...
  $x = scandir('.');
  print_r($x);
  echo "<br />{$x[2]}\n<br />";
  chdir($x[2]);
  $x = scandir('.');
  print_r($x);
?>

Expected result:
----------------
I explected to create dir "?????????????" and go to this dir.

Actual result:
--------------
Warning: mkdir() [function.mkdir]: File exists in D:\www\bad\index.php on line 2
Array ( [0] => . [1] => .. [2] => ????????????? [3] => index.php )
?????????????
Array ( [0] => . [1] => .. [2] => ????????????? [3] => index.php )

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-08-24 10:31 UTC] tony2001@php.net
Windows uses UCS2 internally, I'm pretty sure you're using some different charset for your scripts, so file/dir funcs fail for obvious reasons.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Apr 20 07:02:18 2021 UTC