|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
Patches0001-Workaround-to-support-short-path-which-has-Unicode-c (last revision 2013-10-04 09:23 UTC by ku at digitaldolphins dot jp)Pull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-07-30 11:12 UTC] rsk82 at live dot com
[2013-07-30 16:48 UTC] ab@php.net
-Status: Open
+Status: Duplicate
[2013-07-30 16:48 UTC] ab@php.net
[2013-07-30 17:13 UTC] rsk82 at live dot com
[2013-08-19 06:34 UTC] pajoye@php.net
-Status: Duplicate
+Status: Assigned
-Assigned To:
+Assigned To: pajoye
[2013-08-19 06:34 UTC] pajoye@php.net
[2013-10-04 09:11 UTC] ku at digitaldolphins dot jp
[2015-01-29 17:43 UTC] henry dot fai dot hang dot chan at gmail dot com
[2017-10-24 07:37 UTC] kalle@php.net
-Status: Assigned
+Status: Open
-Assigned To: pajoye
+Assigned To:
[2020-11-18 16:22 UTC] cmb@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: cmb
[2020-11-18 16:22 UTC] cmb@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 18:00:01 2025 UTC |
Description: ------------ I don't know if this is expected. I know that php can't handle international file names in Windows but shortened paths have no Unicode characters in them so I do not see any reason that php should have any problem with that. These paths are perfectly visible to 16bit win311 apps and such files are editable by those programs, of course them cannot see the correct name of the file but this doesn't count any problem with accessing their content. And if that I think php should have similar behavior here. Maybe the php's filesystem functions are trying to "do better" and translate such path to it's normal mode and subsequently are confused about what they have done. Test script: --------------- <? $FS = new \COM('Scripting.FileSystemObject', null, CP_UTF8); $FS->CreateTextFile("c:\\Ελλάδα.txt"); $ShortPath = $FS->GetFile("c:\\Ελλάδα.txt")->ShortPath; echo $ShortPath; $handle = fopen($ShortPath, 'w'); ?> Expected result: ---------------- The script should run without any errors. Actual result: -------------- Warning: fopen(C:\BFEE~1.TXT): failed to open stream: Invalid argument in C:\test.php on line 6