kio_mhtml: KCodecs::base64Decode problem

Spiros Georgaras sngeorgaras at otenet.gr
Mon Dec 20 11:29:49 GMT 2004


Hi

I have a problem using KCodecs::base64Decode (const QByteArray &in, QByteArray 
&out), decoding images from mhtml files.

The problem is that the images I get are 1 or 2 bytes bigger than the original 
ones. The extra bytes are '/0'.

My code is:
....
....
case 1: // base64
	exC.fill(0);
	KCodecs::base64Decode(fContents,exC);
	// fContents is QCString, exC is QByteArray 
	item[i].data=exC;
	item[i].decodedSize=exC.size();
	kdDebug()<<"item[i].decodedSize="<<item[i].decodedSize<<endl;
	break;;
....
....

Can you help?

If you are at kde-core-devel, please CC me <sngeorgaras at otenet.gr> directly or 
kfm-devel at kde.org

Regards
  Spiros





More information about the kde-core-devel mailing list