From kde-devel Wed Aug 20 15:58:47 2003 From: Nicolas Goutte Date: Wed, 20 Aug 2003 15:58:47 +0000 To: kde-devel Subject: Re: QString data X-MARC-Message: https://marc.info/?l=kde-devel&m=106139527425377 On Wednesday 20 August 2003 17:07, Nicolas Goutte wrote: (...) > > The problem of using QString's internal representation is that you depend > on how it works inside Qt. So you need versions for 16 bits QString and one > for 32 bits QString and you need versions for big endian and little endian > computers. Of course, you could say: "I always use 16 bits big endian" > (what normally UCS2 is supposed to be in files) but then you would need > also to convert the data inside your program. > To be clear: if you choose to have always a UCS2 big endian file, the data that you would need to convert is only the word that has to be searched. So it is similar to the QCString solution, but in this case Qt helps you much less, as there is no pre-made class. (see Q_UINT16 as data class and for writing the file, see: QDataStream::operator << and QDataStream::setByteOrder) (...) Habe a nice day! >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<