[wx-dev] Non-ASCII chars in string constant

Vadim Zeitlin vadim at wxwindows.org
Mon Oct 2 01:07:26 PDT 2006


On Sun, 01 Oct 2006 23:36:09 -0700 Robin Dunn <robin at alldunn.com> wrote:

RD> The non-ASCII characters in richtextctrl.cpp gives this error with GCC:
RD> 
RD> ../src/richtext/richtextctrl.cpp: In function ‘bool 
RD> wxIsWordDelimiter(const wxString&)’:
RD> ../src/richtext/richtextctrl.cpp:1613: error: converting to execution 
RD> character set: Invalid or incomplete multibyte or wide character
RD> 
RD> Is there a better way to specify these characters or should they just be 
RD> removed?

 A better way would be to use UTF-8 and then decode the string at run-time.
But in this particular case I don't think this is the right way to do what
this function does at all, it would be better to just use wxIsaslnum()
which should also work for Unicode characters unlike the current method
(and even though I don't know how good is Unicode support in practice, it
should definitely work just fine for ASCII).

 Regards,
VZ





More information about the wx-dev mailing list