// Modified by:
// Created: 19.10.99
// RCS-ID: $Id$
-// Copyright: (c) wxWindows Team
+// Copyright: (c) wxWidgets Team
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
{
// host native is UTF16
wxMBConvUTF16BE converter ;
- wxCharBuffer buffer = converter.cWX2MB( GetText().c_str() );
- return strlen( (const char*) buffer ) + 1;
+ return converter.WC2MB( NULL , GetText().c_str() , 0 ) + 2; // add space for trailing unichar 0
}
else // == wxDF_TEXT
{
{
// host native is UTF16
wxMBConvUTF16BE converter ;
+ size_t len = converter.WC2MB( NULL , GetText().c_str() , 0 ) ;
wxCharBuffer buffer = converter.cWX2MB( GetText().c_str() );
- strcpy( (char*) buf, (const char*) buffer );
+ memcpy( (char*) buf, (const char*) buffer , len + 2); // trailing unichar 0
}
else
{