[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: QString data
From: Harri.Porten () gmx ! de
Date: 2003-08-20 14:13:51
[Download RAW message or body]
> On Wednesday 20 August 2003 13.25, Tim Jansen wrote:
>
> > - you did not compile Qt with QT_QSTRING_UCS_4. In other words, QChar
has 2
> > bytes and not 4. You can check that at compile time, a sizeof(QChar)
should
> > be enough
Above option is rather experimental as I don't think that the rest of
QChar/QString (tables, conversions etc.) are ready to handle 32 bit chars.
> Write strings to file. I'm iteration through the strings, using
> QDataStream.writeRawBytes(string[i], sizeof(QChar)).
Don't use the address of the string itself but the unicode() function !
> Then I mmap() the file into the process, and I have a list of offsets to
> each string within the file. I create QConstString objects under the
assumption
> that each character is sizeof(QChar).
Sounds doable. The only possible problem could be a difference in endianess
or alignment (less likely).
Harri.
--
COMPUTERBILD 15/03: Premium-e-mail-Dienste im Test
--------------------------------------------------
1. GMX TopMail - Platz 1 und Testsieger!
2. GMX ProMail - Platz 2 und Preis-Qualitätssieger!
3. Arcor - 4. web.de - 5. T-Online - 6. freenet.de - 7. daybyday - 8. e-Post
>> 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