I'm not a subject matter expert on this and I'm going from my memory, so I apologize for using incorrect terminology or other unintentional inaccuracies.

Windows has two different APIs for the filesystem. The default API that most programs use (including Perl) has a limitation of about 255 character length on paths and does not support Unicode characters. The other API supports both longer paths and Unicode characters.

Although it sounds like you found a work around that appears to work with the paths that you tested, I personally would be concerned that there could be some situations (or corner cases) where that might not work. If you want to leverage the alternate filesystem API, you can take a look at Win32::LongPath, which "provides replacement functions for most of the native Perl file functions". From your post, you mention stat and file test operators. The Win32::LongPath alternates are statL and testL.

I'll refrain from commenting on what should or should not be recommended to Perl porters on this topic because I don't think I understand things enough to speak intelligently on the topic.


In reply to Re: utf8::downgrade() and file system operators by dasgar
in thread utf8::downgrade() and file system operators by hexcoder

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.