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.