1. If the naming system under Windows can be assumed as UTF-8?

Windows uses UTF-16LE for most stuff, but I don't know if that applies to file names as well.

2. Am I correct assuming if encoding/decoding is done correctly, the usually Perl package should work for wide-character names

Do you mean using non-ASCII-characters in package names in perl? I don't think that's supported.

Or do you want to access arbitrary file names with perl? That's only partly supported, because most operating systems don't know in which character encodings the file names are stored. If you treat the file names as binary data, it should mostly work, though.

 $ctx->addfile(I);

You don't initialize (or even declare) the variable $ctx. That's why it's uninitialized.


In reply to Re: MD5 non ascii file name by moritz
in thread MD5 non ascii file name by benjwlee

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.