mb2wc fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38843 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -681,8 +681,10 @@ wxString wxMacCFStringHolder::AsString(wxFontEncoding encoding)
|
||||
unibuf[cflen] = 0 ;
|
||||
wxMBConvUTF16 converter ;
|
||||
noChars = converter.MB2WC( NULL , (const char*)unibuf , 0 ) ;
|
||||
wxASSERT_MSG( noChars != wxCONV_FAILED, _T("Unable to count the number of characters in this string!") );
|
||||
buf = new wxChar[ noChars + 1 ] ;
|
||||
converter.MB2WC( buf , (const char*)unibuf , noChars ) ;
|
||||
noChars = converter.MB2WC( buf , (const char*)unibuf , noChars + 1 ) ;
|
||||
wxASSERT_MSG( noChars != wxCONV_FAILED, _T("Conversion of string failed!") );
|
||||
delete[] unibuf ;
|
||||
#endif
|
||||
#else
|
||||
|
Reference in New Issue
Block a user