diff --git a/include/wx/string.h b/include/wx/string.h index 414cfd087f..1dc72edeb7 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -4015,7 +4015,7 @@ inline const char* wxCStrData::AsChar() const inline const wxScopedCharBuffer wxCStrData::AsCharBuf() const { -#if !wxUSE_UNICODE +#if !wxUSE_UNICODE || wxUSE_UTF8_LOCALE_ONLY return wxScopedCharBuffer::CreateNonOwned(AsChar()); #else return AsString().mb_str();