Re: [Cppunit-devel] Unicode
Brought to you by:
blep
From: Baptiste L. <bl...@cl...> - 2001-05-23 18:30:04
|
> * adding a function ustring( const char *) to estring.h to construct a > unicode string from a const char *string. > This one is a problem for portability. Mapping from "char *" to unicode is > done using WIN32 API. > So how is that done on unix. Is there a single API for all Unix to do the > mapping ? (I know that QT support unicode and is portable, but not how > difficult it is to achieve on Unix) I looked at how it was done in QT 2.3.0 QString class (http://www.trolltech.no, worth looking at if you don't know what it is ;-) ). If I got the code right, latin1 is converted to unicode by casting the char to a wchar_t. Since the most common use for this conversion would be for RTTI names and standard exception messages, they likely would be latin1. So we could implements this simple conversion for Unix. Did I mess up real hard reading the code ? What do you think of this solution ? Baptiste. --- Baptiste Lepilleur <gai...@fr...> http://gaiacrtn.free.fr/index.html Author of The Text Reformatter, a tool for fanfiction readers and writers. Language: English, French (Well, I'm French). |