Using Strawberry Perl x64 on Windows, I'm having a bit of a problem with
-e that fails recognize file names if the name contains an accented character, meaning:
-e $path returns false even though the file exists.
I'm reading the file names out of an XML file, and thus, they are strings with the UTF-8 flag set.
I'm quite sure the cause of the problem is the mix of character encodings in Perl on Windows, as the standard encoding of the CMD shell (under which Perl runs) is CP-850, Explorer and the Windows API appear to be using either CP-1252 or 16-bit wide Unicode characters; and the Unicode-enabled strings in Perl.
I have no idea which encoding -e expects to work as it should. It does work if the path contains only plain ASCII characters.
So... what do I have to do to make it work?
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.