On Tuesday 07 March 2006 21:29, Scott Cantor wrote: > > > > w_char doesn't work, eh? > > > > > > On Windows, yes. Occasionally a few other places. Not on Solaris or > > > Linux. > > > > <shrug> (How) (D|d)oes XMLCh differ from Unicode 16? > > I think you mean UTF-16, and it doesn't. XMLCh is specifically UTF-16. But > wchar_t is not UTF-16 everywhere. It's non-portable, and Solaris and Linux > each use different (including from each other) encodings for wchar_t.
> No, probably you do. But only where you need it. I guess I don't need it > all that many places, certainly not enough to pay for transcoding all over. <quote url=http://doc.trolltech.com/4.1/qstring.html> The QString class provides a Unicode character string. QString stores a string of 16-bit QChars, where each QChar stores one Unicode 4.0 character. Unicode is an international standard that supports most of the writing systems in use today. It is a superset of ASCII and Latin-1 (ISO 8859-1), and all the ASCII/Latin-1 characters are available at the same code positions. </quote> So, if everybody is telling the truth, can I not just do this? const XMLCh* QtoX(const QString& s) { return reinterpret_cast<const XMLCh*>(s.constData()); } const XMLCh* CtoX(const char* cs) { return QtoX(cs); } Steven --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
