X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/43b2d5e7c3b3e3d6b245e279dde73d96e0075911..737e53350cffa493e72691fd965ebd60d5349bf2:/src/richtext/richtextxml.cpp diff --git a/src/richtext/richtextxml.cpp b/src/richtext/richtextxml.cpp index feb26567ae..d6b35b6b4e 100644 --- a/src/richtext/richtextxml.cpp +++ b/src/richtext/richtextxml.cpp @@ -495,7 +495,11 @@ static void OutputStringEnt(wxOutputStream& stream, const wxString& str, OutputString(stream, str.Mid(last, i - last), convMem, convFile); wxString s(wxT("&#")); +#if wxUSE_UNICODE s << (int) c; +#else + s << (int) wxUChar(c); +#endif s << wxT(";"); OutputString(stream, s, NULL, NULL); last = i + 1; @@ -547,7 +551,11 @@ static wxString AttributeToXML(const wxString& str) str1 += str.Mid(last, i - last); wxString s(wxT("&#")); +#if wxUSE_UNICODE s << (int) c; +#else + s << (int) wxUChar(c); +#endif s << wxT(";"); str1 += s; last = i + 1; @@ -730,7 +738,11 @@ bool wxRichTextXMLHandler::ExportXML(wxOutputStream& stream, wxMBConv* convMem, } else for (i = 0; i < len; i++) { +#if wxUSE_UNICODE int c = (int) text[i]; +#else + int c = (int) wxUChar(text[i]); +#endif if ((c < 32 || c == 34) && c != 9 && c != 10 && c != 13) { if (i > 0)