From 90b5819c2eb02261826ff64205eb3cba5678dadb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Mon, 14 Jan 2008 22:40:28 +0000 Subject: [PATCH] fixed wxXmlResource::GetText() in ANSI build to correctly convert the string to current locale's charset git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@51218 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 2 ++ src/xrc/xmlres.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/changes.txt b/docs/changes.txt index 39c07a8333..f999254fb7 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -110,6 +110,8 @@ All (GUI): - Improve wximage::ResampleBox() (Mihai Ciocarlie). - Implemented ScrollList() in generic wxListCtrl (Tim Kosse). - SaveAs in docview takes into account path now. +- Fixed wxXmlResource::GetText() to convert data to current locale's + charset in ANSI build. All (Unix): diff --git a/src/xrc/xmlres.cpp b/src/xrc/xmlres.cpp index 96242df826..a8e71bfeeb 100644 --- a/src/xrc/xmlres.cpp +++ b/src/xrc/xmlres.cpp @@ -942,7 +942,7 @@ wxString wxXmlResourceHandler::GetText(const wxString& param, bool translate) #else // The string is internally stored as UTF-8, we have to convert // it into system's default encoding so that it can be displayed: - return wxString(str2.mb_str(wxConvUTF8), wxConvLocal); + return wxString(str2.wc_str(wxConvUTF8), wxConvLocal); #endif } }