To fix 1, you need to use Unicode strings (or if the filesystem is written with 
a specific ISO character page, you have to find out which one, I think - maybe 
they automatically remap to Unicode, not sure). Your filesystem is 99+% going 
to be UTF-8 aware. English works fine for you because ISO-8859-1 maps to the 
first page of UTF-8 anyway (this is intentional). But everything else is going 
to look like it was written to a Windows box.

I'm not sure about number 2... you may have to parse the string to change it.


-----Original Message-----
From: gtk-app-devel-list-boun...@gnome.org 
[mailto:gtk-app-devel-list-boun...@gnome.org] On Behalf Of sledge hammer
Sent: Thursday, April 30, 2009 1:55 PM
To: gtk-app-devel-list@gnome.org
Subject: Problems using/understanding drag-and-drop.


Hi,

In my app I want the user to drag-n-drop files from nautilus, then the 
application should open them. I am using as Targets:
1. STRING
2. text/plain

Then when the drag_data_received() signal is emitted, I use the get_text()  
method on the SelectionData to get the text.
Everything works fine but I have 2 problems:
1. non-english filenames(glib::ustrings) output garbled content
2. spaces in the filename are represented as "%20"

Obviously this is a charset encoding problem. But I can't find a way to deal 
with it. Any ideas?

Sidenote: I actually pass the filename string to gstreamer but it errors. Also 
I use gtkmm and C++, but I think C/GTK guys will be able to help me too. Thanks 
in advance.

_________________________________________________________________
Σύρετε φωτογραφίες στο παράθυρο του Messenger. Δείτε πώς.
http://download.live.com/messenger 
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to