From 97ddad38c50cc1d9cd0f752bfa216ac4dc5800dc Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sun, 3 Feb 2002 23:54:37 +0000 Subject: [PATCH] Unicode compilation fixes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13984 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/src/xrc/xml.cpp | 4 ++-- src/xrc/xml.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/src/xrc/xml.cpp b/contrib/src/xrc/xml.cpp index 692a39f0bc..d7001dd1e9 100644 --- a/contrib/src/xrc/xml.cpp +++ b/contrib/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 ) 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 ) -- 2.50.0