I've had a look at this, and I'd strongly recommend putting those const char* functions in the CEGUI::String class ASAP, regardless of when the "proper" implementations are due. Probably also operator+ (two variantions) and operator+=. I've got a patch, but its trivial enough job as its only a couple of lines.
The main reason for it is that at the moment we're forced to add these ugly uft8* casts in every single line of client code that uses a string. These in turn will need to be pulled out of the client code at the time CEGUI::String adds the support - so its much better to wrap it now, and allow all the clients to use their const char* as nature intended.
Another point in favour is once you put it in, you see that there are quite a few implicit conversions going on from char*. For example, most exceptions are actually done in the following way:
Code: Select all
throw Thing((utf8*)"start " + string + "end")
This in turn gets converted to
Code: Select all
(CEGUI::String)(uft8*) + string + (std::string)(const char*)
These things are slipping through due to lack of constructors and operators involving native const char*. There is also an amusing case of char* + string + char*, which somehow gets through with another wily std::string cast. Well, its amusing to a programmer, I suppose.
For clients as well, the cast is incorrect - they don't have a utf8* at all. Its simply a hack, and given it is, its much better in a centralised place that is future proof (ie the string constructor), rather than in dozens of places that will need to all be removed at a later date (unless you want to end up with "dead wood" casts lying around the code).
Sorry to ramble on about a minor point like this after all your great work getting beta1 out (it kicks ass!), but this does affect almost a huge amount of calling client code, so its best to get the interface right as early as possible. The actual >127 conversion code is far less important at this stage, given nobody actually requires it, and it can be easily integrated into a string class that has previously set up the proper char* interface.