Is WxWidgets for me?

Robert Roebling robert at roebling.de
Tue May 6 03:36:40 PDT 2008


Graeme Gill wrote:

> I notice at the bottom of this page
> <http://wiki.wxwidgets.org/Development:_UTF-8_Support>,
> there is an open question about a UTF-8 build under MSWindows.
> 
> I would presume this is because the win32 API are setup to
> handle Unicode as 16 bit wide chars, so supporting UTF-8 implies
> converting all the string arguments to/from the API calls within
> WxWidgets.

Indeed.

> From the perspective of someone using WxWidgets cross platform,
> and interfacing to a non-WxWidgets back end, then being
> able to use UTF-8 uniformly within WxWidgets on all
> platforms would be far cleaner 

wxString offers the same interface no matter how the 
string is stored internally. There are arguments for
always storing strings in UTF-8, for always storing
them as wchar_t and for storing them as wchar_t under
Windows and UTF-8 under Unix.

I once propsed to let wxString store it in either
UTF-8 or wchar_t with a flag at run-time, but this
may degrade performance due to worse inlining behaviour.


> than having to add special
> code for the MSWindows version (ie. it would make it more platform
> transparent to be able to assume UTF-8 everywhere).

This has been discussed with no conclusion, but there is currently
no support for UTF8 mode under Windows. What you can do is the
opposite, i.e. get the "old" wchar_t mode under Unix as before.

  Robert




More information about the wx-users mailing list