[wx-dev] wxCSConv::cMB2WX

Vaclav Slavik vslavik at fastmail.fm
Sun Mar 2 02:38:23 PST 2008


Hi,

Robert Roebling wrote:
> I only looked at the docs and wasn't sure if they were still 
> correct in that area. I wondered if cMB2WX() is not a misnomer today 

Yes, it is, and I think it should be deprecated as soon as ANSI build 
is removed for good.

> The point is  
> that sometimes, wxCSConv might actually be using UTF8 and if
> the source string needs to be put into a wxString it will
> now get converted to wchar_t and then back to UTF8 (in UTF8
> mode).

If you're constructing a wxString from UTF-8 data, then use 
wxString::FromUTF8(). Or use wxString(char*,wxCSConv) constructor, 
which will recognize UTF-8 wxCSConv instances too and optimize the 
conversion out. (The latter doesn't work in ANSI build, but FromUTF8 
does.)

> Apart from that, if we remove the ANSI build entirely, the
> docs for whatever cMB2WX would have returned in ANSI can be
> removed, I think. I don't know if the code (or wxWidgets as
> a whole) still compiles in ANSI mode, in which case we might
> keep the docs as they are. The next question is: Do we plan
> to remove the ANSI build entirely?

I thought we do, I certainly very much want to. The trunk is Unicode 
by default for months now and it went smoother than I expected.

Regards,
Vaclav

-- 
PGP key: 0x465264C9, available from http://pgp.mit.edu/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.wxwidgets.org/pipermail/wx-dev/attachments/20080302/2fc1156c/attachment.pgp


More information about the wx-dev mailing list