Re: php can't resolve 8.3 paths to unicode filenames, is that expected ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi,

On Wed, Aug 14, 2013 at 9:09 AM, R. S. <rsk82@xxxxxxxx> wrote:

> The code is provided in this thread and in my (dismissed)
> bug report.
>
>     <?
>     $FS = new \COM('Scripting.FileSystemObject', null, CP_UTF8);
>     $FS->CreateTextFile("c:\\Ελλάδα.txt");
>     $ShortPath = $FS->GetFile("c:\\Ελλάδα.txt")->ShortPath;
>     echo $ShortPath;
>     $handle = fopen($ShortPath, 'w');
>     ?>
>
> Here the file is created trough COM as it is stated in source code.
> The com object isn't having any problem with translation from utf
> to encoding used with windows file systems.

COM is not PHP: You are calling the FileSystemObject's GetFile via COM
which uses unicode APIs under the hood. Nothing to do with PHP
streams.

>> Also UTF-8 (or the likes) paths for IO operation has nothing to very
>> little to do with Unicode support as described or tried in the never
>> released PHP 6. It is "only" about using another set of the Windows
>> file APIs, in very short, about using the <funcname>W ones instead of
>> the <funcname>A (which are aliases to <funcname> when UNICODE define
>> is not set).
>
> So this should be trivial to change in php's source code.

Not really, and not only in PHP code but all dependencies PHP uses.



-- 
Pierre

@pierrejoye | http://www.libgd.org

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux