]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/strconv.cpp
DoGetBestSize fix, the lbWidth was not getting updated because of a
[wxWidgets.git] / src / common / strconv.cpp
index b80d82fdb62a2460450f7da315530afc8319ff03..f442e54dcd595e15998e5e0a67473c55e0e07b04 100644 (file)
@@ -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