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

Pierre Joye <[email protected]>
Newsgroups gmane.comp.php.windows
Message-ID <CAEZPtU4tZD_qQFcvunBK7R8KnLOzsUErsc1W4iiTPpbDA97HNw@mail.gmail.com>
hi,

On Wed, Aug 14, 2013 at 9:09 AM, R. S. <[email protected]> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.