Opened 10 years ago

Last modified 9 years ago

#11744 new defect

wxFileDataObject Problem with oriental characters

Reported by: anonbeat Owned by:
Priority: normal Milestone:
Component: wxGTK Version:
Keywords: wxFileDataObject, drag and drop Cc:
Blocked By: Blocking:
Patch: no


Im using in ubuntu 9.10. This is a tiny section of the affected code.


wxFileDataObject Files;

if( GetDragFiles( &Files ) )

wxDropSource source( Files, this );

m_DragSelfItems = true;
wxDragResult Result = source.DoDragDrop();


That works fine when using filenames with occidental characters but not when using oriental characters. For example fails with the filename
01 - サクラ色.mp3
When dropped I receive
01 - サクラ􀃨􀂉

Its the wxDropSource/wxFileDataObject as I can drop files directly from nautilus but cant drag n drop from my app to nautilus.

Change History (4)

comment:1 Changed 10 years ago by vadz

  • Status changed from new to infoneeded_new

Does this also happen in the dnd sample?

If yes, what is exactly the name of the file (i.e. the sequence of Unicode codes for the characters above)?

comment:2 Changed 10 years ago by anonbeat

  • Status changed from infoneeded_new to new

The problem only happens in wxDropSource. The wxDropTarget works fine. I cant test using dnd sample as I can drag a file from this sample.

the filename encoded is %30%31%20%E3%82%B5%E3%82%AF%E3%83%A9%E8%89%B2.mp3


comment:3 Changed 10 years ago by anonbeat

I want to add that I have also the problem with files with the # char in the name. Always on wxDropSource as wxDropTarget accepts them fine but I cant add as source any file with # character

comment:4 Changed 9 years ago by vadz

Sorry, I still didn't have time to look at this... It would be really great if you could provide a patch showing the problem in a sample so that I could test it. Also, could you please test your code with 2.9.1 or, ideally, upcoming 2.9.2 and check if the problem is still there? I hope it could be fixed in 2.9.

Note: See TracTickets for help on using tickets.