diff --git a/include/wx/string.h b/include/wx/string.h index 3b112d582d..1710a2e165 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -3031,7 +3031,7 @@ WXDLLIMPEXP_BASE wxSTD ostream& operator<<(wxSTD ostream&, const wxCharBuffer&); WXDLLIMPEXP_BASE wxSTD ostream& operator<<(wxSTD ostream&, const wxWCharBuffer&); #endif -#endif // wxSTD_STRING_COMPATIBILITY +#endif // wxUSE_STD_IOSTREAM // --------------------------------------------------------------------------- // wxCStrData implementation diff --git a/src/common/string.cpp b/src/common/string.cpp index fbfe6cb6b5..36efc0ce8e 100644 --- a/src/common/string.cpp +++ b/src/common/string.cpp @@ -72,11 +72,10 @@ const size_t wxString::npos = (size_t) -1; wxSTD ostream& operator<<(wxSTD ostream& os, const wxCStrData& str) { -// FIXME-UTF8: always, not only if wxUSE_UNICODE -#if wxUSE_UNICODE && !defined(__BORLANDC__) - return os << (const wchar_t*)str.AsWCharBuf(); +#if wxUSE_UNICODE && !wxUSE_UNICODE_UTF8 + return os << (const char *)str.AsCharBuf(); #else - return os << (const char*)str.AsCharBuf(); + return os << str.AsInternal(); #endif }