Use wxString methods for UTF-8 conversions in wxX11 code.
Use wxString::utf8_str() and FromUTF8() to convert to and from UTF-8. This is more efficient than using wxConvUTF8 as the code did before as it avoids the conversion entirely when wxString uses UTF-8 internally (as it does by default in wxX11) and also has the advantage of compiling in STL build unlike the old code. Closes #12518. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65657 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -53,8 +53,8 @@
|
||||
#include "wx/x11/private.h"
|
||||
#include "wx/gtk/private/string.h"
|
||||
|
||||
#define wxPANGO_CONV(s) (wxConvUTF8.cWX2MB((s)))
|
||||
#define wxPANGO_CONV_BACK(s) (wxConvUTF8.cMB2WX((s)))
|
||||
#define wxPANGO_CONV(s) s.utf8_str()
|
||||
#define wxPANGO_CONV_BACK(s) wxString::FromUTF8Unchecked(s)
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user