Bug #70903 [Com]: scandir wrongly interprets the Turkish "ı" character

From: Date: Sat, 19 Dec 2015 01:45:17 +0000
Subject: Bug #70903 [Com]: scandir wrongly interprets the Turkish "ı" character
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-198015@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70903&edit=1

 ID:                 70903
 Comment by:         ajf@php.net
 Reported by:        eparlakay at hotmail dot com
 Summary:            scandir wrongly interprets the Turkish "ı"
                     character
 Status:             Open
 Type:               Bug
 Package:            *Directory/Filesystem functions
 Operating System:   Windows 7 Enterprise
 PHP Version:        7.0.0RC7
 Block user comment: N
 Private report:     N

 New Comment:

I suspect this is an issue with Windows's filesystem case handling and not PHP itself.

Could you try the Command Prompt and see how it responds here?


Previous Comments:
------------------------------------------------------------------------
[2015-11-12 23:33:14] eparlakay at hotmail dot com

Correcting a typo error in actual result:

Folder is created

Warning: mkdir(): File exists in C:\testingScandir.php on line 6
ERROR for Asli:

------------------------------------------------------------------------
[2015-11-12 23:30:13] eparlakay at hotmail dot com

Description:
------------
Scandir function wrongly interprets the Turkish "ı" (i without dot) character. It
interprets the "ı" as "i".

For the test script, assume there are two directories in a folder:

c:\Music\
 |
 | Aslı
 | Asli



Test script:
---------------
<?php
	$FILES = scandir("C:\\Music\\");
	
	foreach($FILES as $k=>$v)
	{
		if(!mkdir("c:\\TEST\\".$v))
		{
			echo "ERROR for ".$v."\n";
		}
                else
		{
			echo "Folder is created\n";
		}
	}
?>

Expected result:
----------------
Folder is created
Folder is created

Actual result:
--------------
Folder is created

Warning: mkdir(): File exists in C:\testingScandir.php on line 6
ERROR for Sila: 



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



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


Thread (5 messages)

« previous php.bugs (#198015) next »