I'm sorry - I misunderstood your sentence

...and now most linux systems are using UTF-8 as native encoding and perl has no mechanism to deal with this?

as relevant to the problem in the sense that you wanted Perl to automatically decode all filenames from UTF-8. I assumed you wanted an automagic solution becuase certainly you are aware of Encode and the common way of simply decoding all filenames from the filesystem by calling decode('UTF-8', $filename).

If you can post some code where Perl actually munges the filename encoding, that would be interesting, because I am unaware of a situation where

opendir my $dir, '.'; for my $ent ( readdir $dir ) { if(! -e $ent ) { print "'$ent' is read but does not exist" } };

produces any output. Of course, once you mix data from other sources than the file system and data from the filesystem functions, you need to be aware of the respective encodings and convert between them, but in absence of a short, self-contained example of Perl code (plus the type of file system and the filename, as hex), it's hard to advise you better.

You continue your post with a paragraph that starts with

The fix is simple...

I'm not sure how your fix would address the problems you encounter, and how your fix would maintain backwards compatibility. Feel free to posit your ideas to the perl5-porters mailing list, or even better, supply working code, as that has the greatest chance of moving Perl in the direction you seem to want.


In reply to Re^5: how to unicode filenames? by Corion
in thread how to unicode filenames? by perl-diddler

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.