[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#612675: Re[2]: Bug#612675: libkio5: KTar class have broken UTF-8 support(longlink)



Hello,

On pirmadienis 09 Gegužė 2011 13:24:51 Ibragimov Rinat wrote:
> > > Can you point to some of those checks? I've looked through the code
> > > again and found nothing related to QString. There are only some of
> > > them related to QByteArray.
> > 
> > But why do you think QByteArray checks are not affected?
> 
> Because QByteArray is intended to store raw bytes [1],

Basically, QByteArray is a wrapper class on top of char*. For example, 
QString::toUtf8() returns QByteArray as well.

> while QString stores
> charactes which may be wider than 8-bit. Current implementation uses 16-bit
> QChars [2].

Well, ok, but that still does not explain why you cast one "check" to 
(unsigned char) leaving others untouched. QByteArray::operator[] also returns 
a _signed_ char. So what makes you think those chars will always be <= 127 ?

-- 
Modestas Vainius <modax@debian.org>

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: