Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Unicode path with Spreadsheet::XLSX

by Anonymous Monk
on Mar 18, 2018 at 12:30 UTC ( #1211184=note: print w/replies, xml ) Need Help??


in reply to Unicode path with Spreadsheet::XLSX

Thank you for your suggestions.

At the end, my original script works using both:

my $MYPath = Win32::GetANSIPathName ($path); my $MYPath = shortpathL ($path);

However, $MYPath cannot be in the same folder as the script itself! Moving it somewhere else, for example on the Desktop, and reading it with:

my $PathDesktop = File::HomeDir->my_desktop; my $MYPath= $PathDesktop . "\\Ршзеф&#109 +2;.xlsx";

allows the script to work fine.

The idea of copying the file with a 'simple' file name is worth using, as it is simple and effective. Direct reading the file handle did not work for me.

Replies are listed 'Best First'.
Re^2: Unicode path with Spreadsheet::XLSX
by Anonymous Monk on Mar 19, 2018 at 20:52 UTC

    Some more observations. The same script using the short path provided by the two modules introduced above seems to fail if the files are not on the same hard drive of the Windows OS. I do not know if it makes sense: but when the same file/folder with unicode is on another drive, it just fails.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2020-12-03 04:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you use taint mode?





    Results (50 votes). Check out past polls.

    Notices?