[wx-dev] UTF-8 for internal string processing
Vadim Zeitlin
vadim at wxwidgets.org
Sun Apr 6 12:47:17 PDT 2008
On Sun, 06 Apr 2008 20:41:06 +0200 Robert Roebling wrote:
RR> The current wxString class is an opaque class where the user doesn't
RR> know what encoding the class is using and the class (or rather
RR> wxWidgets) will choose what is "the best" encoding for the majority
RR> of cases. There are, however, cases when the programmer knows better
RR> than wxWidgets and will need O(1) access to the string. In this
RR> case, the user should have the option to dictate what encoding
RR> wxString uses and this should be possible at run-time (to avoid
RR> having different builds again). This would add the overhead to
RR> wxString that it has to store what encoding it is using, but this
RR> seems like the least price to pay. I'd actually like to have the
RR> option to use UTF-8 on Windows, too.
Again, this is something that in principle should work even now but
probably doesn't because nobody tests it. And while I agree that this could
be useful, I'm not sure if it's worth the efforts we'd need to spend on
maintaining this possibility.
OTOH the idea of having wxCharString, wxWCharString and wxUTF8String
always (well, subject to wxUSE_UTF8 and wxUSE_UTF8_LOCALE_ONLY maybe)
available in any wx build might be nice. It would still need some work to
rearrange the existing code to work like this...
Regards,
VZ
More information about the wx-dev
mailing list