Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
Hi Monks,

I have a script that packed as Executable. The usage is drop files or folder to the executable and then prompt for "What to do" option.

Everything goes fine, until a new problem comes, which is @ARGV can't recognize Unicode file/dir name. and the path passing in becomes ?????. Then unable to locate the path for action.

Since the client side do not have have Perl installed, so this can't be perl -CA "script.pl" or if I try to use #!perl -CA and it said It's too late for "-CA" option

I've did some research, some may suggest to use I18N::Langinfo This drive me another problem, it is I can't install the module whatever I tried.

I tried ppm install, don't find this module.
I tried cpan install, fail!
cpan force install, still fail
cpan fforce install, the download and fetching starts.... but ends up said program too big to fit in memory.
btw, I tried both on Perl 5.10 and 5.14.

Anyway, my question is how to retrieve the @ARGV correctly? I am working on a Big5(Traditional Chi) XP system, however my script need to read GB(Simplified Chi), and Japanese char(path). What can I do about it? Please help, Thanks in advance!


In reply to How can I get a Unicode @ARGV? by exilepanda

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!
  • 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, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others chilling in the Monastery: (11)
    As of 2014-12-26 14:39 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      Is guessing a good strategy for surviving in the IT business?





      Results (171 votes), past polls