fix wxStringOutputStream::Write() in Unicode build when the output overlaps a boundary between UTF-8 characters (closes bug 1701426)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45733 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-05-01 14:11:06 +00:00
parent 8736cc485b
commit 2c17722ec8
3 changed files with 56 additions and 3 deletions

View File

@@ -61,6 +61,9 @@ public:
// The stream will write data either to the provided string or to an
// internal string which can be retrieved using GetString()
wxStringOutputStream(wxString *pString = NULL)
#if wxUSE_UNICODE_WCHAR
: m_unconv(0)
#endif // wxUSE_UNICODE_WCHAR
{
m_str = pString ? pString : &m_strInternal;
m_pos = m_str->length() / sizeof(wxChar);
@@ -90,6 +93,11 @@ private:
wxMBConv m_conv;
#endif
#if wxUSE_UNICODE_WCHAR
// unconverted data from the last call to OnSysWrite()
wxMemoryBuffer m_unconv;
#endif // wxUSE_UNICODE_WCHAR
DECLARE_NO_COPY_CLASS(wxStringOutputStream)
};