X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4d876ee3f727afa0d79aa5f7b03bf9a59673bef6..7b82d78291036d3abb54f5ae259f5dfb958b9c0c:/src/xrc/xml.cpp diff --git a/src/xrc/xml.cpp b/src/xrc/xml.cpp index 692a39f0bc..d7001dd1e9 100644 --- a/src/xrc/xml.cpp +++ b/src/xrc/xml.cpp @@ -469,7 +469,7 @@ static int UnknownEncodingHnd(void * WXUNUSED(encodingHandlerData), // We must build conversion table for expat. The easiest way to do so // is to let wxCSConv convert as string containing all characters to // wide character representation: - wxCSConv conv(name); + wxCSConv conv(wxString(name, wxConvLibc)); char mbBuf[255]; wchar_t wcBuf[255]; size_t i; @@ -559,7 +559,7 @@ inline static void OutputString(wxOutputStream& stream, const wxString& str, { if (str.IsEmpty()) return; #if wxUSE_UNICODE - const wxW2MBbuf *buf = str.mb_str(convFile ? *convFile : wxConvUTF8); + const wxWX2MBbuf buf(str.mb_str(convFile ? *convFile : wxConvUTF8)); stream.Write((const char*)buf, strlen((const char*)buf)); #else if ( convFile == NULL )