Use Scintilla's functions for Unicode/UTF8 conversions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29932 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -3109,36 +3109,26 @@ typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&);
|
||||
// Utility functions used within wxSTC
|
||||
|
||||
#ifndef SWIG
|
||||
#if wxUSE_UNICODE
|
||||
|
||||
wxString stc2wx(const char* str);
|
||||
wxString stc2wx(const char* str, size_t len);
|
||||
const wxWX2MBbuf wx2stc(const wxString& str);
|
||||
|
||||
#else // not UNICODE
|
||||
|
||||
inline wxString stc2wx(const char* str) {
|
||||
#if wxUSE_UNICODE
|
||||
return wxString(str, wxConvUTF8);
|
||||
#else
|
||||
return wxString(str);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if wxUSE_UNICODE
|
||||
wxString stc2wx(const char* str, size_t len);
|
||||
#else
|
||||
inline wxString stc2wx(const char* str, size_t len) {
|
||||
return wxString(str, len);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#if wxUSE_UNICODE
|
||||
inline const wxWX2MBbuf wx2stc(const wxString& str) {
|
||||
return str.mb_str(wxConvUTF8);
|
||||
}
|
||||
#else
|
||||
inline const wxWX2MBbuf wx2stc(const wxString& str) {
|
||||
return str.mbc_str();
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif // UNICODE
|
||||
#endif // SWIG
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user