Unicode Filename Drag'n'Drop Problem
Erdem U. Altinyurt
eua at dsl.ttnet.net.tr
Wed Jan 24 09:17:47 PST 2007
Hi,
I am writer of DivFix++ AVI Fix and Preview program...(
http://divfixpp.sf.net )
I have implemented Drag'nDrop support to wxListBox, but I realized
that, Unicode filenames not drag and drop correctly.
for example, Filename is "filename", a with ^.
wxFileDialog returns this files name as "filen\340me"
But wxFileDropTarget::OnDropFiles returns this file name as "filename",
a with ^.
Than I couldn't open this file using wxFile. Because this filename is
not recognized.
wxFile::Exists( "filen\340me" ) returns true but
wxFile::Exists( "filename" ) , a with ^, returns false.
I applied bug report, but do you know a transition solution for this?
virtual bool OnDropFiles(wxCoord x, wxCoord y, const wxArrayString&
filenames){
int nFiles = filenames.GetCount();
for ( int n = 0; n < nFiles; n++ ) {
if ( wxFile::Exists( filenames.Item(n) )){
if ( m_listbox->GetString( m_listbox->FindString(
filenames.Item(n) ) ) != filenames.Item(n) )
m_listbox->Append(filenames.Item(n));
}
}
return TRUE;
}
not working for unicode files, because wxFile::Exists not recognize
unicode file names...
More information about the wx-users
mailing list