[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need some help with Rmail/mbox

From: Richard M. Stallman
Subject: Re: Need some help with Rmail/mbox
Date: Fri, 19 Sep 2008 00:30:57 -0400

    As near as I can tell the task is to decode the message body in two
    steps: first to decode according to the character encoding
    (e.g. quoted-printable or base64) and then to decode that result to
    some coding system.

That is correct.

                         Something along the lines of:

         (let (body)
           (setq body (apply qp or base64 to body of message)

You call `mail-unquote-printable-region' or  `base64-decode-region'.
They operate on the buffer.

           (decode-coding-string body (detect-coding-string body t))

Use `decode-coding-region'.  It operates on the buffer.

When operating on large amount of text, don't do it in strings.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]