One, you could be more clear that you're talking about non-ASCII filenames and not the contents. Someone above already seems confused on that point.

Two, the "backticks rename" method relies on your operating system shell. On DOS/Windows, the rename command allows wildcards in source and target, and the shell has weak support for non-ASCII filenames. The graphical shell probably has a completely different set of bugs when dealing with non-ASCII filenames.

Three, the internal rename() function relies on your operating system routines.

Four, whenever you say "non-ASCII" you should indicate what encoding you are using. ISO-2022-JP? Codepage 328? What types of characters are you trying to put into filenames?

Five, once you know the encoding you think you're using, look up the Encode modules and google around to see if anyone else has any similar problems or solutions.

The quality of the help is always proportional to the quality of the question. Said another way, if we can't understand you, we can't offer the advice you seek.

--
[ e d @ h a l l e y . c c ]


In reply to Re: Renaming non-ascii files by halley
in thread Renaming non-ascii files by jon12

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.