#31 drag & drop encoding problems

open
nobody
None
5
2009-01-10
2009-01-10
Soos Gergely
No

Greetings

What I would like to do in perlqt is drag&drop some files. The perlqt program is catching tem. It works except for files containing non-english letters.
I've tried everything I could think of, for example converting from utf-8 but that only converts the special chars to "?".
Using Data::Dumper this is an example how I receive the filenames:
$VAR1 = "file:///home/disk/MP3/Irigy H\x{f3}naljmirigy - J\x{e1}r a g\x{e9}p \x{fa}jfenn.mp3";
The \x{f3} should be an "ó", \x{e1} is "á", \x{e9} is "é" and \x{fa} is "ú".
What should I do? I can't enumerate every character!
The file was dropped from konqueror, my LANG environment variable is set to "en_US.ISO-8859-1"
This is the code that catches the drops:
sub dropEvent {
my ($e)=@_;
my $text;
do_something($text) if Qt::TextDrag::decode( $e, $text, 'plain' );
}

Thank you,
Gergely

Discussion