Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: En/Decode a unicode path

by jwkrahn (Abbot)
on Jan 22, 2023 at 11:12 UTC ( [id://11149759]=note: print w/replies, xml ) Need Help??


in reply to En/Decode a unicode path

dealing with ANSI?

American National Standards Institute?

Are you submitting a new standard?

Naked blocks are fun! -- Randal L. Schwartz, Perl hacker

Replies are listed 'Best First'.
Re^2: En/Decode a unicode path
by haukex (Archbishop) on Jan 22, 2023 at 13:14 UTC
    American National Standards Institute?

    From Windows-1252 (emphasis mine):

    This article is about the character encoding commonly mislabeled as "ANSI". For the actual ANSI character encoding, see ASCII. For the actual "ANSI extended Latin" encoding, see ANSEL.
Re^2: En/Decode a unicode path
by ikegami (Patriarch) on Jan 23, 2023 at 22:24 UTC

    For every Windows API function that deals with a string, there's an (A)NSI and a (W)ide version of it.

    The ANSI version uses the ANSI/Active Code Page as the encoding, while the wide version uses UTF-16le.

    Perl builtins use the (A)NSI version of API functions, so interactions with the system via Perl builtins are limited to the character set of the ACP.

    For Windows for the American market, the system's ACP is 1252.

      Perl builtins use the (A)NSI version of API functions
      Thank you! This is some how inspiring. Now I can do this :
      use Win32; use Storable; my $file = Win32::GetShortPathName('X:\Some\Unicode\Path\\'); # it giv +es me a 8.3 path print -e $file; # Got it! store {}, "$file/Storable.sto"; # Done!
      The only draw back for now is the path/file must existing, so that the FS can "assign" the 8.3 location.
Re^2: En/Decode a unicode path
by exilepanda (Friar) on Jan 22, 2023 at 11:25 UTC
    sorry for my poor English/terminology , I mean the path can be dealing like in ANSI code page

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11149759]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2024-03-29 06:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found