kio_mhtml: KCodecs::base64Decode problem
Spiros Georgaras
sngeorgaras at otenet.gr
Tue Dec 21 08:26:00 GMT 2004
Ingo Klöcker wrote:
> My guess is that the problem is caused by the trailing '\0' in the
> QCString. Try something like
> // copy the data of fContents to a QByteArray without the trailing '\0'
> QByteArray ba( fContents.data(), fContents.length() );
> KCodecs::base64Decode( ba, exC );
>
Thank you very much for the tip!!!
The code is now:
case 1: // base64
ba.setRawData( fContents.data(), fContents.length() );
KCodecs::base64Decode( ba, exC );
ba.resetRawData( fContents.data(), fContents.length() );
item[i].data=exC;
item[i].decodedSize=exC.size();
//kdDebug()<<"item[i].decodedSize="<<item[i].decodedSize<<endl;
break;;
Regards
Spiros
More information about the kfm-devel
mailing list