[prev in list] [next in list] [prev in thread] [next in thread]
List: kfm-devel
Subject: Re: kio_mhtml: KCodecs::base64Decode problem
From: Spiros Georgaras <sngeorgaras () otenet ! gr>
Date: 2004-12-21 8:26:00
Message-ID: 200412211026.01404.sngeorgaras () otenet ! gr
[Download RAW message or body]
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic