Unicode fixes for OLE files (I don't know if I used correct conversion objects!)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17770 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2002-11-09 00:32:30 +00:00
parent f3654dd181
commit 7962c237dd
2 changed files with 3 additions and 2 deletions

View File

@@ -837,7 +837,8 @@ static wxString ConvertStringFromOle(BSTR bStr)
char *buf = new char[len];
(void)wcstombs( buf, bStr, len);
wxString str(buf);
// FIXME -- use bStr directly in Unicode mode?
wxString str(buf, wxConvLibc);
delete[] buf;
return str;
}

View File

@@ -1098,7 +1098,7 @@ protected:
// CFSTR_SHELLURL is _always_ ANSI!
wxCharBuffer char_buffer( GetDataSize() );
wxCustomDataObject::GetDataHere( (void*)char_buffer.data() );
wxString unicode_buffer( char_buffer );
wxString unicode_buffer( char_buffer, wxConvLibc );
memcpy( buffer, unicode_buffer.c_str(),
( unicode_buffer.length() + 1 ) * sizeof(wxChar) );