[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:08:12
[Download RAW message or body]

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

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

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