emacs-devel
[Top][All Lists]
Advanced

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

Need some help with Rmail/mbox


From: Paul Michael Reilly
Subject: Need some help with Rmail/mbox
Date: Thu, 18 Sep 2008 12:02:19 -0400

The basic problem I need to solve now is how to map the values of the
content-type and content-transfer-encoding headers (either of which
could legally be absent) to an Emacs coding system.  I am slogging
through this task and if anyone has already done it and has either a
short "how-to" or even better some code, that would be much
appreciated.

As Eli helpfully pointed out, rmail-convert-to-babyl-format provides
some help.

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.  Something along the lines of:

     (let (body)
       (setq body (apply qp or base64 to body of message)
       (decode-coding-string body (detect-coding-string body t))

Am I even in the ballpark?

-pmr




reply via email to

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