GNOME Bugzilla – Bug 140980
g_filename_from_uri fails to parse URI in chinese
Last modified: 2004-12-22 21:47:04 UTC
Select Language "Simplified Chinese" in the log in screen. Run Nautilus, in the /tmp folder create and new folder. (This new folder name is in chinese.) Try to drag this folder to a GTK app that supports drag&drop. In my case I used Eclipse (eclipse.org). I could verify that the "data" of the drag_data_received callback is the string: file:///tmp/%CE%B4%C3%FC%C3%FB%CE%C4%BC%FE%BC%D0 If a paste this string into mozilla (or nautilus) it will correctly open this folder. Therefore I believe the URI is right. The problem is: if I use g_filename_from_uri() to parse this URI it returns a error message: The URI 'file:///tmp/%CE%B4%C3%FC%C3%FB%CE%C4%BC%FE%BC%D0' contains invalidly escaped characters Maybe the problem is that after unescaping the string glib expect to have a valid UTF-8 string, I'm afraid that in this case the string might be encoded in GB18030. I believe this should work. If after unescaping the URI the string resulting is already in the plaform encoding it should bypass the "UTF-8"->"Platform encoding" conversion and return the string.
I believe this is a duplicate of #140532. Can you please test this with glib 2.4.3 or later? If this is a different bug, please re-open it. *** This bug has been marked as a duplicate of 140532 ***