in reply to Re: Tk unicode paths chooseDirectory vs getOpenFile and getSaveFile
in thread Tk unicode paths chooseDirectory vs getOpenFile and getSaveFile

No solution with Tk yet, but I conducted a little investigation, Prima on Windows suffers the same (or worse) issues with Unicode in paths returned from standard file/directory selection dialogs. But IUP appears to perform correctly in my tests:

use strict; use warnings; use feature 'say'; binmode STDOUT, 'utf8'; use IUP ':all'; my $dlg = IUP::FileDlg-> new( DIALOGTYPE => 'OPEN' ); # try 'DIR' for +folder selection my $app = IUP::Dialog-> new( TITLE => 'Test', MARGIN => '10x10', GAP = +> 10, child => IUP::Vbox-> new([ IUP::Button-> new( TITLE => 'Select', PADDING => '10x10', ACTI +ON => sub { $dlg-> Popup; if ( $dlg-> STATUS != -1 ) { say $dlg-> VALUE; } return IUP_DEFAULT }), ]), ); $app-> Show; IUP-> MainLoop;

(Maybe consider this toolkit as replacement? :) Looks nice, and feature-rich and cross-platform, too.)

  • Comment on Re^2: Tk unicode paths chooseDirectory vs getOpenFile and getSaveFile
  • Download Code

Replies are listed 'Best First'.
Re^3: Tk unicode paths chooseDirectory vs getOpenFile and getSaveFile
by Takamoto (Monk) on Mar 12, 2019 at 15:18 UTC

    Thank you for pointing me to IUP which I never heard of before. why it is never ever mentioned in connection to Perl and GUI?!? It looks very interesting! Unfortunately, in my case the (very big) application is based on Tk, and changing toolkit is not possible.