From: Václav Slavík Date: Mon, 11 Dec 2006 21:14:48 +0000 (+0000) Subject: fixed wxCSConv to work again for iso-8859-1 X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/2c74c558766a4f50be92c4a33d4fdbb11cf47d2c fixed wxCSConv to work again for iso-8859-1 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43941 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/strconv.cpp b/src/common/strconv.cpp index b80d82fdb6..f442e54dcd 100644 --- a/src/common/strconv.cpp +++ b/src/common/strconv.cpp @@ -3523,8 +3523,11 @@ size_t wxCSConv::ToWChar(wchar_t *dst, size_t dstLen, { CreateConvIfNeeded(); - return m_convReal ? m_convReal->ToWChar(dst, dstLen, src, srcLen) - : wxCONV_FAILED; + if (m_convReal) + return m_convReal->ToWChar(dst, dstLen, src, srcLen); + + // latin-1 (direct) + return wxMBConv::ToWChar(dst, dstLen, src, srcLen); } size_t wxCSConv::FromWChar(char *dst, size_t dstLen, @@ -3532,8 +3535,11 @@ size_t wxCSConv::FromWChar(char *dst, size_t dstLen, { CreateConvIfNeeded(); - return m_convReal ? m_convReal->FromWChar(dst, dstLen, src, srcLen) - : wxCONV_FAILED; + if (m_convReal) + return m_convReal->FromWChar(dst, dstLen, src, srcLen); + + // latin-1 (direct) + return wxMBConv::FromWChar(dst, dstLen, src, srcLen); } size_t wxCSConv::MB2WC(wchar_t *buf, const char *psz, size_t n) const