emacs-devel
[Top][All Lists]
Advanced

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

Re: Rmail-mbox branch


From: Stephen J. Turnbull
Subject: Re: Rmail-mbox branch
Date: Mon, 08 Sep 2008 18:53:41 +0900

Francesco Potorti` writes:

 > >[3]  For practical purposes we can assume that message bodies which are
 > >'text/plain; charset=XYZ' for XYZ=iso-8859-1, XYZ=iso-8859-15, and
 > >XYZ=utf-8 will generally "just work", too.  But it's easy to imagine
 > >situations where a MIME-conforming MUA might render such incorrectly
 > >without a MIME Content-Type header to guide it, such as a Latin-2-
 > >using locale.
 > 
 > One thing that I find useful is searching mbox files using standard Unix
 > text tools.  This is not possible for base-64 coded messages.  However,
 > I can edit an mbox file, convert its text from base-64 and edit the MIME
 > header appropriately, thus still obtaining an RFC-compliant message that
 > is searchable and that can be displayed without further decoding (it is
 > smaller, too).  I do this routinely for the three charsets you mentioned
 > above, but it should work for any charset.  I suggest that this
 > conversion be made automatically whenever possible and sensible.

This is always trivially possible in Emacs.[1]  The key, as you
mention, is fixing the Content-Transfer-Encoding field to '8bit' after
decoding, and (perhaps) recoding from a legacy charset to UTF-8, in
which case you'll need to fix the Content-Type field's 'charset'
parameter, too.

However, whether it is "sensible" depends on the user's environment,
including what other MUAs and text-processing tools you have
available.  I recommend rather making this a folder-specific user
setting, defaulting to 'ask.  You yourself could set it to 'always
since you have favorable experience with it.  Or perhaps the values
should be something like 'never, 'ask, 'always-content-type (where
this uses the value specified in the 'charset' parameter of the
Content-Type field), and 'always-utf8.

Footnotes: 
[1]  Of course you have to know how to use Mule, which is not yet
fully diffused into the community.  Once you've got that, though, it's
trivial.  Borrow the BASE64 and QP decoders from Gnus, and use
de/en-code-coding-region to fix up the MIME charset.





reply via email to

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