From kde-devel Wed Aug 20 15:08:12 2003 From: Nicolas Goutte Date: Wed, 20 Aug 2003 15:08:12 +0000 To: kde-devel Subject: Re: QString data X-MARC-Message: https://marc.info/?l=kde-devel&m=106139249921969 On Wednesday 20 August 2003 16:13, Harri.Porten@gmx.de wrote: > > 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. Well, as far as I have understood full UCS-4 support is planned for Qt 4.0. So perhaps now you could not care about it now, but you would still have the problem in future. (...) > > > 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). Yes, good catch! Endianess is indeed a problem for portability in this case. > > Harri. Have a nice day! >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<