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
 [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-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 17:01:29 2024 UTC