Recent changes to 31: drag & drop encoding problemshttp://sourceforge.net/p/perlqt/bugs/31/2009-01-10T20:56:36Zdrag & drop encoding problems2009-01-10T20:56:36Z2009-01-10T20:56:36ZSoos Gergelyhttp://sourceforge.net/u/soger/http://sourceforge.net78d98439ac229a34681eacdd28d81e8f6bc84cdc<div class="markdown_content"><p>Greetings</p>
<p>What I would like to do in perlqt is drag&amp;drop some files. The perlqt program is catching tem. It works except for files containing non-english letters.<br />
I've tried everything I could think of, for example converting from utf-8 but that only converts the special chars to "?".<br />
Using Data::Dumper this is an example how I receive the filenames:<br />
$VAR1 = "file:///home/disk/MP3/Irigy H\x{f3}naljmirigy - J\x{e1}r a g\x{e9}p \x{fa}jfenn.mp3";<br />
The \x{f3} should be an "ó", \x{e1} is "á", \x{e9} is "é" and \x{fa} is "ú".<br />
What should I do? I can't enumerate every character!<br />
The file was dropped from konqueror, my LANG environment variable is set to "en_US.ISO-8859-1"<br />
This is the code that catches the drops:<br />
sub dropEvent {<br />
my ($e)=@_;<br />
my $text;<br />
do_something($text) if Qt::TextDrag::decode( $e, $text, 'plain' );<br />
}</p>
<p>Thank you,<br />
Gergely</p></div>