in reply to Re^2: Spreadsheet::ParseXLSX filename non Latin Tk getOpenFile
in thread Spreadsheet::ParseXLSX filename non Latin Tk getOpenFile
My thinking is that could could modify your code to something like (untested):
# assumes $filename is set from Tk my $fh; Win32::LongPath::openL (\$fh, '<', $filename) or die "Unable to open $filename"; my $parser = Spreadsheet::ParseXLSX->new(); my $workbook = $parser->parse($fh); # do stuff
openL is documented at https://metacpan.org/pod/Win32::LongPath#openL-FILEHANDLEREF,MODE,PATH
You could also check the filename can be found using testL. https://metacpan.org/pod/Win32::LongPath#testL-TYPE,PATH
This all comes with the caveat that I have not used these functions, although if it does work then it will help solve one of my own longstanding headaches with a Gtk2 application.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Spreadsheet::ParseXLSX filename non Latin Tk getOpenFile
by IB2017 (Pilgrim) on Nov 21, 2018 at 10:56 UTC | |
by swl (Prior) on Nov 21, 2018 at 20:58 UTC |