If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
eco wrote:And std::string has no concept of UTF-8 so I'd recommend avoiding stuffing a UTF-8 string in one.
It should be OK actually. std::string and wxString are just a bunch of bytes and don't check for zeros etc. so you should be ok with any encoding as long as you remember to explicitly specify the length.
[Mostly retired moderator, still check in to clean up some stuff]
Thanks heda, eco and Ryan! eco's suggestion works perfectly. I only wish I'd known about wxWidgets a year ago! This removes the last GPL function from my program, so I can finally switch to LGPL...
Ryan Norton wrote:It should be OK actually. std::string and wxString are just a bunch of bytes and don't check for zeros etc. so you should be ok with any encoding as long as you remember to explicitly specify the length.
leio wrote:And UTF-8 doesn't really contain \0's in strings, it is used for specifying the end of a string, as is common in C strings.
Both good points. I suppose the best advice would be to simply not use any character (byte) specific operations on the data. If you do that, either should work great.