From: rsk82 at live dot com Operating system: Windows XP PHP version: 5.4.17 Package: Filesystem function related Bug Type: Bug Bug description:php can't handle 8.3 names of files which have long names with unicode in them
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 -- Edit bug report at https://bugs.php.net/bug.php?id=65358&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=65358&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=65358&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=65358&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=65358&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=65358&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=65358&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=65358&r=needscript Try newer version: https://bugs.php.net/fix.php?id=65358&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=65358&r=support Expected behavior: https://bugs.php.net/fix.php?id=65358&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=65358&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=65358&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=65358&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65358&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=65358&r=dst IIS Stability: https://bugs.php.net/fix.php?id=65358&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=65358&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=65358&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=65358&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=65358&r=mysqlcfg