[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: QString data
From:       Nicolas Goutte <nicolasg () snafu ! de>
Date:       2003-08-20 15:58:47
[Download RAW message or body]

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 <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic