- wxMBConvUTF16BE converter ;
- wxCharBuffer buffer = converter.cWX2MB( GetText().c_str() );
- return strlen( (const char*) buffer ) + 1;
+ wxMBConvUTF16BE converter ;
+ return converter.WC2MB( NULL , GetText().c_str() , 0 ) + 2; // add space for trailing unichar 0