Hello,

I'm wondering if there's any way to get Mutt to decode the filenames of
attachments. Here's a bit from an attachment I received today:

    Content-Type: application/octet-stream; 
        name="=?EUC-KR?B?MjAxMbq9ILCzvLOxs7D6uPEoRSkueGxz?="
    Content-Transfer-Encoding: base64
    Content-Disposition: attachment; 
        filename="=?EUC-KR?B?MjAxMbq9ILCzvLOxs7D6uPEoRSkueGxz?="

Here's the actual filename, which you can find using Python:

    >>> from email.header import decode_header
    >>> decode_header('=?EUC-KR?B?MjAxMbq9ILCzvLOxs7D6uPEoRSkueGxz?=')
    [('2011\xba\xbd \xb0\xb3\xbc\xb3\xb1\xb3\xb0\xfa\xb8\xf1(E).xls',
    'euc-kr')]
    >>> unicode('2011\xba\xbd
    >>> \xb0\xb3\xbc\xb3\xb1\xb3\xb0\xfa\xb8\xf1(E).xls', 'euc-kr')
    u'2011\ubd04 \uac1c\uc124\uad50\uacfc\ubaa9(E).xls'

Mutt seems to think that the filename is literally =?EUC-KR?B...=, so it
can't guess to open the file with a spreadsheet program. Also, if I try
to save the attachment, it doesn't decode the filename, and I wind up
saving a file literally named =?EUC-KR... which isn't very useful.

Mutt already decodes such things in the headers of emails -- how can I
get Mutt to do that decoding of the file name of an attachment?

Thanks,

Dan

--
---  Dan Drake
-----  http://mathsci.kaist.ac.kr/~drake
-------

Attachment: signature.asc
Description: Digital signature

Reply via email to