- //*4 is the worst case - for UTF8
- wxStringBufferLength internalBuffer(*this, (nLen << 2) + 1);
+ //Create a wxStringBufferLength which will access the internal
+ //C char pointer in non-stl mode
+ wxStringBufferLength internalBuffer(*this, wxString::WorstEncodingCase(nLen, conv) + 1);