// Author: Vadim Zeitlin
// RCS-ID: $Id$
// Copyright: (c) 2004 Vadim Zeitlin
-// Licence: wxWidgets licence
+// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx/wx.h".
m_str.reserve(LEN);
for ( size_t n = 0; n < LEN; n++ )
{
- m_str += wxChar(_T('A') + n % (_T('Z') - _T('A') + 1));
+ m_str += wxChar(wxT('A') + n % (wxT('Z') - wxT('A') + 1));
}
}
{
wxStringOutputStream sos;
- size_t len = text.length();
-#if wxUSE_UNICODE
- const wxCharBuffer textMB(wxConvLibc.cWC2MB(text.wc_str(), len + 1, &len));
-#else
- const char *textMB = text.c_str();
-#endif
-
- sos.Write(textMB, len);
+ const wxCharBuffer buf(text.To8BitData());
+ sos.Write(buf, buf.length());
CPPUNIT_ASSERT_EQUAL( text, sos.GetString() );
}