Decoding content-disposition-filename HTTP header

Tom Albers tomalbers at kde.nl
Sun Sep 14 18:33:12 BST 2008


At Sunday 14 September 2008 19:03, you wrote:
> Hi. Trying to download file with cyrillic filename I get
> =?UTF-8?B?0JrRgNC40YLQtdGA0LjQuCDQvtGG0LXQvdC40LLQsNC90LjRjyDQvtGA0LvQvtCy0L7QuS
> yYXI=?=
> It's obvious that =?UTF-8 part tells us we should decode it as being UTF-8.
> I also seen this kind of encoding in email headers
> 
> I'n sure that the code to handle this is already written. Can anybody
> point me to it?
> 
> Ps. Is it correct that the decoding should be made in
> TransferJob::slotMetaData()?

from memory, it should be in kdepimlibs / kmime / utils, the rfc2047 functions should be there. Although I'm pretty sure that rfc is implemented in multiple place, this is the best one iirc.

Toma


More information about the kde-core-devel mailing list