The broken handling of Unicode on file system operations is not just a Windows issue. It is not done correctly in Unix/Linux either:

See how the UTF8 flag is completely ignored in scalars passed as arguments to built-ins performing file system operations in the following re.pl session:

salva@atun:/tmp/unicode$ re.pl $ $a="a\xf1o" a�o $ $b = $a a�o $ use Devel::Peek $ utf8::upgrade($b) 4 $ Dump $a SV = PV(0x557576d4e2d0) at 0x557576812a80 REFCNT = 1 FLAGS = (POK,IsCOW,pPOK) PV = 0x557576d516c0 "a\361o"\0 CUR = 3 LEN = 10 COW_REFCNT = 0 $ Dump $b SV = PV(0x557576d4e2a0) at 0x557576d4b7d0 REFCNT = 1 FLAGS = (POK,pPOK,UTF8) PV = 0x557576d6e6e0 "a\303\261o"\0 [UTF8 "a\x{f1}o"] CUR = 4 LEN = 10 $ open A, ">$a"; 1 $ open B, ">$b"; 1 $ system "ls" aņo a?o 0 $ $a eq $b 1

In reply to Re: RFC: system calls on Unicode filesystem by salva
in thread RFC: system calls on Unicode filesystem by daxim

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.