- wxCharBuffer buffer = m_conv.cWC2MB( out );
- m_output.Write( (const char*) buffer, strlen( (const char*) buffer ) );
+ // FIXME-UTF8: use wxCharBufferWithLength if/when we have it
+ wxCharBuffer buffer = m_conv->cWC2MB(out.wc_str(), out.length(), &len);
+ m_output.Write(buffer, len);