In ANSI build wxString::mb_str() returns a pointer to the internal wxString
data directly instead of a buffer with a proper length, so it provides access
to the part of the string before the first embedded NUL only.
Use To8BitData() which always returns the buffer of the correct size in all
builds.
The open question remains whether mb_str() should be changed to return a (non
owned) buffer and not just a pointer in ANSI build. This would make
manipulating strings with embedded NULs safer but mb_str() would be less
efficient and less compatible.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66102 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use "wxWindows licence" and not "wxWidgets licence" (the latter doesn't
exist) and consistently spell "licence" using British spelling.
See #12165.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64940 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxScopedCharBuffer can't be constructed from char* string, just use
wxCharBuffer instead, we don't care about efficiency here.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63950 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We wrote an extra NUL byte to the stream and, unsurprisingly, contents of its
buffer didn't match the original string resulting in the test failure.
Also get rid of a #if wxUSE_UNICODE.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63249 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1. changed c_str() to return wxCStrData (implicitly convertible to wxChar*)
2. added template type-safe wrappers for vararg functions
3. added wxUniChar class representing single Unicode character
4. changed wxString::operator[] and wxString::iterator to return wxUniChar
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44865 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775