Subject: | unicode not displayed properly in getOpenFile |
Directories whose names contain non-Latin unicode characters are not
displayed properly in getOpenFile.
To reproduce the bug, execute the attached script. It creates a
directory with Greek characters in its name, then pops up a dialog box
to open a file. The directory doesn't show up properly in the file
dialog. The program writes output to the terminal showing the versions
of Tk and perl, and on unix it will also verify that the name of the
created directory has Greek letters and that the script itself is
encoded in unicode.
Info about the system on which I observed the bug: Tk version is
804.029. Perl version is 5.14.2. Ubuntu 12.04.1.
Subject: | bug.pl |
#!/usr/local/bin/perl
use Tk;
print "Tk version is ",$Tk::VERSION,".\n";
print "Perl version is ",(sprintf "%vd",$^V),".\n";
my $directory_name = "in_Îλληνικά";
mkdir $directory_name or die "error creating directory $directory_name, $!";
-d $directory_name or die "did mkdir $directory_name, but it doesn't exist??";
print `ls`; # on unix, will demonstrate that the directory really does have Greek characters in it
print `file bug.pl`; # on unix, will tell you whether the source code is encoded in unicode, as it should be
my $mw = new MainWindow;
$mw->getOpenFile();
my $button = $mw -> Button(-text => "Quit",-command => sub {
rmdir $directory_name or die "error removing directory $directory_name, $!";
exit();
})-> pack();
MainLoop;