diff --git a/docs/latex/wx/wxstring.tex b/docs/latex/wx/wxstring.tex index 445d0058f7..544bd55821 100644 --- a/docs/latex/wx/wxstring.tex +++ b/docs/latex/wx/wxstring.tex @@ -586,7 +586,7 @@ to a function expecting non-const pointer. \membersection{wxString::char\_str}\label{wxstringcharstr} -\constfunc{wxWritableCharBuffer}{char\_str}{\void} +\constfunc{wxWritableCharBuffer}{char\_str}{\param{wxMBConv\&}{ conv = wxConvLibc}} Returns an object with string data that is implicitly convertible to {\tt char*} pointer. Note that any change to the returned buffer is lost and so diff --git a/include/wx/string.h b/include/wx/string.h index d60073694c..c24ca6c5b5 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -1094,7 +1094,8 @@ public: // conversion to *non-const* multibyte or widestring buffer; modifying // returned buffer won't affect the string, these methods are only useful // for passing values to const-incorrect functions - wxWritableCharBuffer char_str() const { return mb_str(); } + wxWritableCharBuffer char_str(const wxMBConv& conv = wxConvLibc) const + { return mb_str(conv); } wxWritableWCharBuffer wchar_str() const { return wc_str(); } // conversion to/from plain (i.e. 7 bit) ASCII: this is useful for