implement To/FromWchar() as wxCSConv methods, otherwise wxCSConv(wxFONTENCODING_UTF16) didn't work correctly even if the underlying wxMBConvUTF16 did

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43877 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-12-09 16:19:34 +00:00
parent b51abd7380
commit 1c714a5d07
2 changed files with 23 additions and 0 deletions

View File

@@ -3518,6 +3518,24 @@ void wxCSConv::CreateConvIfNeeded() const
}
}
size_t wxCSConv::ToWChar(wchar_t *dst, size_t dstLen,
const char *src, size_t srcLen) const
{
CreateConvIfNeeded();
return m_convReal ? m_convReal->ToWChar(dst, dstLen, src, srcLen)
: wxCONV_FAILED;
}
size_t wxCSConv::FromWChar(char *dst, size_t dstLen,
const wchar_t *src, size_t srcLen) const
{
CreateConvIfNeeded();
return m_convReal ? m_convReal->FromWChar(dst, dstLen, src, srcLen)
: wxCONV_FAILED;
}
size_t wxCSConv::MB2WC(wchar_t *buf, const char *psz, size_t n) const
{
CreateConvIfNeeded();