Skip Menu |

This queue is for tickets about the Tk CPAN distribution.

Report information
The Basics
Id: 124439
Status: new
Priority: 0/
Queue: Tk

Owner: Nobody in particular
Requestors: interpretbank [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Subject: Tk::DragDrop unable to manage unicode file names
Date: Thu, 15 Feb 2018 17:26:25 +0000
To: bug-Tk [...]
From: InterpretBank <interpretbank [...]>

Tk::DragDrop is not able to manage Unicode file names? If I drag a file from my Windows 10 Desktop to the drop area, I get ??? instead of my user Name (which is 事報導). The path cannot processed anymore. 

Tk 804.34

ActivePerl 32 bit

Windows 10, German

This is the code I am using:

#!/usr/local/bin/perl -w use Tk; use Tk::DropSite; use strict; use vars qw($top $drop); $top = new MainWindow; $top->Label(-text => "The drop area:")->pack; $drop = $top->Scrolled('Listbox', -scrollbars => "osoe", )->pack; my $SomeVariable="xxx"; $drop->DropSite (-dropcommand => [\&accept_drop, $drop, $SomeVariable], -droptypes => ($^O eq 'MSWin32' ? 'Win32' : ['KDE', 'XDND', 'Sun']) ); MainLoop; sub accept_drop { my ($drop, $SomeVariable, $selection) = @_; print "This is my variable passed from the main: $SomeVariable\n"; my $filename; eval { if ($^O eq 'MSWin32') { $filename = $drop->SelectionGet(-selection => $selection, 'STRING'); } else { $filename = $drop->SelectionGet(-selection => $selection, 'FILE_NAME'); } }; $drop->insert(0, $octets); if (defined $filename) { $drop->insert(0, $filename); } } __END__

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to