From 70897a70383c4030fcf80e9ae951ff0862c9ec4c Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sun, 4 May 2008 21:03:50 +0000 Subject: [PATCH] clarified From/To8BitData's purpose git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53450 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- interface/string.h | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/interface/string.h b/interface/string.h index 038722cac1..4b2db0cb89 100644 --- a/interface/string.h +++ b/interface/string.h @@ -544,14 +544,19 @@ public: //@{ /** - Converts given buffer of binary data from 8-bit string to wxString. In Unicode - build, the string is interpreted as being in ISO-8859-1 encoding. The version - without @a len parameter takes NUL-terminated data. - This is a convenience method useful when storing binary data in wxString. + Converts given buffer of binary data from 8-bit string to wxString. In + Unicode build, the string is interpreted as being in ISO-8859-1 + encoding. The version without @a len parameter takes NUL-terminated + data. + + This is a convenience method useful when storing binary data in + wxString. It should be used @em only for that purpose and only in + conjunction with To8BitData(). Use mb_str() for conversion of character + data to known encoding. @since 2.8.4 - @see wxString::To8BitData + @see wxString::To8BitData() */ static wxString From8BitData(const char* buf, size_t len); static wxString From8BitData(const char* buf); @@ -825,13 +830,16 @@ public: //@{ /** - Converts the string to an 8-bit string in ISO-8859-1 encoding in the form of - a wxCharBuffer (Unicode builds only). - This is a convenience method useful when storing binary data in wxString. + Converts the string to an 8-bit string in ISO-8859-1 encoding in the + form of a wxCharBuffer (Unicode builds only). + + This is a convenience method useful when storing binary data in + wxString. It should be used @em only for this purpose. It is only valid + to call this method on strings created using From8BitData(). @since 2.8.4 - @see wxString::From8BitData + @see wxString::From8BitData() */ const char* To8BitData() const; const const wxCharBuffer To8BitData() const; -- 2.45.2