use UTF8-encoded char* strings in UTF8 build instead of wchar_t* if the current locale uses UTF8;

fall back to widechar CRT functions in the locale is not UTF8


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45663 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2007-04-26 11:40:04 +00:00
parent 210bb741b9
commit 2523e9b700
23 changed files with 1368 additions and 656 deletions

View File

@@ -23,7 +23,8 @@
// ----------------------------------------------------------------------------
#include "wx/defs.h" // everybody should include this
#include "wx/wxchar.h" // for wxChar, wxStrlen() etc.
#include "wx/chartype.h" // for wxChar
#include "wx/wxcrt.h" // for wxStrlen() etc.
#include <stdlib.h>
@@ -540,12 +541,10 @@ public:
// string += char
wxStringImpl& operator+=(wxStringCharType ch) { return append(1, ch); }
#if !wxUSE_UNICODE_UTF8
// helpers for wxStringBuffer and wxStringBufferLength
wxStringCharType *DoGetWriteBuf(size_t nLen);
void DoUngetWriteBuf();
void DoUngetWriteBuf(size_t nLen);
#endif
private:
#if wxUSE_UNICODE_UTF8