in reply to Re: Tk causes problems with file paths containing non-Latin-1 chars
in thread Tk causes problems with file paths containing non-Latin-1 chars
The changes to the test program so it will run under Linux|OS-X|Win32 are:
... use if ($^O =~ m/MSWin32/i || ''), 'Win32'; ... my $is_win32 = $^O =~ m/MSWIN32/i; ... sub test_file { my $file = ucx(shift); ... } sub ucx { my $fn = shift; return $is_win32 ? Win32::GetANSIPathName($fn) : decode('utf8', $fn) +; }
Out of curiosity, I went looking for the GetANSIPathName method in the ActiveState (win32) lib code. As far as I could see, it's not a Perl function, so I guess it must be all in a dll someplace.
For anyone who wants to play with this, a zip of the code and data can be downloaded from http://itee.uq.edu.au/~chernich/downloads/tkbug.zip.
|
|---|