Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Unicode path with Spreadsheet::XLSX

by afoken (Canon)
on Mar 18, 2018 at 10:05 UTC ( #1211180=note: print w/replies, xml ) Need Help??


in reply to Unicode path with Spreadsheet::XLSX

Files on Windows generally have a "short" name that is compatible with legacy software (i.e. DOS, Windows 3.x Applications). It is limited to the old DOS "8.3" schema and contains no spaces, no tricky characters, just a subset of printable ASCII.

Demo:

C:\>mkdir temp C:\>cd temp C:\temp>echo hi > "foo bar.batz" C:\temp>echo hello > "metäl ümläüts äre silly.öpiniön" C:\temp>dir /x Volume in drive C is System Volume Serial Number is D4F2-C5FF Directory of C:\temp 18.03.2018 10:56 <DIR> . 18.03.2018 10:56 <DIR> .. 18.03.2018 10:54 5 FOOBAR~1.BAT foo bar.batz 18.03.2018 10:56 8 METLML~1.PIN metäl ümläüts äre sil +ly.öpiniön 2 File(s) 13 bytes 2 Dir(s) 56.432.050.176 bytes free C:\temp>

Those names are not limited to legacy applications. Any application can use them, including perl:

C:\temp>perl -pe 1 foobar~1.bat metlml~1.pin hi hello C:\temp>

Another, unrelated benefit of those legacy aliases is that they tend to be shorter than the original name. This can be useful to handle files with ridiculously long names, longer than Windows' limits usually allow. See deepcopy for details.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (1)
As of 2020-12-05 06:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you use taint mode?





    Results (63 votes). Check out past polls.

    Notices?