Described in the comments and documented the semantics of the parameters and
return values of wxMBConv methods and tried to make them more consistent. The only (intentional) backwards incompatible change is that cMB2WC/cWC2MB now return the length of the converted string in outLen parameter and not length+1 Added wxMBConv::GetMBNul() and use it instead of supposing that all multibyte strings are always terminated with a single NUL which is wrong for UTF-16/32. Using GetMBNul(), completely rewrote cMB2WC/cWC2MB() to accept a string of the specified length, whether it is NUL-terminated or not. This means that they don't overwrite the provided buffer any more and convert the entire string in all cases. Fixed bug in wxMBConvUTF16::WC2MB() which didn't NUL-terminate the string properlyv even if there was enough space. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38498 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -11,6 +11,9 @@ INCOMPATIBLE CHANGES SINCE 2.6.x
|
||||
- For all wxInputStreams, Eof() becomes true after an attempt has been made
|
||||
to read _past_ the end of file.
|
||||
- wxCHECK family of macros now must be followed by a semicolon
|
||||
- wxMBConv::cMB2WC() and cWC2MB() take size of the input buffer and return
|
||||
length of the converted string in all cases now.
|
||||
|
||||
|
||||
Deprecated methods since 2.6.x and their replacements
|
||||
-----------------------------------------------------
|
||||
|
Reference in New Issue
Block a user