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

List:       kde-devel
Subject:    Re: QString data
From:       Johnny Andersson <johnny () johnnys ! info>
Date:       2003-08-20 16:16:10
[Download RAW message or body]

On Wednesday 20 August 2003 17.58, Nicolas Goutte wrote:

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

Hi again. I'm implementing the QCString solution right now, so far it seems like
the best bet after all. It didn't occur to me that I could do comparison directly on 
two utf8 QCStrings, like you say. Which means, again like you say, that I only
have to convert my search string to utf8. In my previous solution, I did string.fromUtf8()
before every comparison - too slow. :)

I'm not sure if it's "good" to compare to utf8 strings directly, but
as japanese characters don't have upper and lower case, it's probably OK.
My only concern right now is if things like utf8cstring1.contains(utf8cstring2) will
work...  Haven't tried it yet. 


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