<<< Date Index >>>     <<< Thread Index >>>

Re: e-mail encoding/formatting (was Re: Split-screen mode in mutt?)



Thus spake Alain Bench on Sun, May 07, 2006 at 12:29:02PM +0200 or
thereabouts: <veronatif@xxxxxxx> [2006-05-07 06:52]:
>  On Saturday, May 6, 2006 at 13:22:44 -0400, cga2000 wrote:
> 
> > double-checked the raw contents using the od command
> 
>     BTW to examine conveniently the raw content of a message, I pipe
>     it to less with a pair of macros while $pipe_decode=no (as per
>     default):
> 
> | macro pager & "<pipe-message>less<Enter>"   "voir le message brut" |
> macro pager \e& "<pipe-message>LESSCHARSET=ascii LESSCHARDEF= \ |
> LC_ALL=C less<Enter>" "voir le message très brut"
> 
.. well, granted "less" (or vim.. etc.) don't understand/use the
message's "content headers" but when I visualize a file containing
x'E2809C' x'E2809D' with my locale set to UTF-8 using "less", the 3-byte
characters are displayed as one - opening & closing double curlies..

so that's why I figured I should check the hex contents of the file:

$ od -t x1z -w32 /tmp/file

I wanted to make sure the file did contain x'E2809C' (3 bytes) - not
the six bytes with the hex representation of 'E' '2' '8' '0' '9' 'C' -
iow x'453238303943'.

> 
> > [=E2=80=9C and such quoted-unreadable] mutt/vim are not recognizing
> > the UTF-8 encoding for this particular message, or am I mistaken?
> 
>     What's unrecognised is the *quoted-printable* encoding, and you
>     have the same problem with *every* QP message without attachments
>     (just you noticed only this one). Same problem with any charset.
> 
> 
> > this same message we are talking about displays correctly your end?
> 
>     Yes. And for me, <view-attachments> (bound to 'v' by default) of
>     the said mail shows one part only "[text/plain, quoted, utf-8, c,
>     1,5K]".  And for you?

same, unfortunately.. now, I've been thinking that I switched to UTF-8
in the middle of this thread.. precisely just before I composed this
particular message. Or to be more exact: hit 'L' to reply-list to a
message that dated back to 'before I switched'.. I have a feeling this
might have something to do with what happened.

but see below for more.. in the way of clues.. 

> 
>     Note here Mutt knows it's "quoted" (short for QP), the raw message
>     really contains =20 and such, Mutt decodes them on-the-fly, and
>     sends the real characters to the pager (or to vim, or to a command
>     in $pipe_decode=yes mode, to a text file with <decode-copy>,
>     etc...).
> 
> 
> > Could it be that this message was somehow "damaged" on the way back
> > to me (from the list, I mean) .. possibly due to something in my
> > headers relative to content-type.. encoding.. etc..
> 
>     Yes. Something (MTA, procmail, other) removed or damaged the
>     "Content-Transfer-Encoding: quoted-printable" field of the main
>     header.  But what? Perhaps:
> 
>  -1) A st**pid destructive procmail self-foot-shooting rule.

st**pid..? what mysterious encoding are you using now? :-)

Yes, that's quite likely where the problem lies.. I stole some
.procmailrc from someone who probably doesn't give a hoot about UTF-8
and found some rules that are supposed to fix stuff:

----------------------------------------------------------------------
# preconverts all plain-text mail arriving in certain encoded
# MIME formats into a more compact 8-bit format which can be
# used and displayed more easily by most programs.
:0
* ^Content-Type: *text/plain
{
:0 fbw
* ^Content-Transfer-Encoding: *quoted-printable
| mimencode -u -q

:0 Afhw
| formail -I "Content-Transfer-Encoding: 8bit"

:0 fbw
* ^Content-Transfer-Encoding: *base64
| mimencode -u -b

:0 Afhw
| formail -I "Content-Transfer-Encoding: 8bit"
}
----------------------------------------------------------------------

The comments right at the start of the above excerpt from my .procmailrc
state that whatever I handled by procmail is "compacted: to an 8-bit
format.. I guess that might do it.. But then again as mentioned
earlier, the circumstances were a little peculiar.. with my switching
right in the middle of this thread.. So, I'll have to look into this a
little more closely.

I don't have time to figure out what these rules do right now but I'll
comment them out and come back to it later...

> 
>  -2) Low probability but... Your provider seems to use a "Sun Java
> System Messaging Server" as MTA. This is an heritage of the infamous
> iPlanet all-purpose mail platform. And is very bad, especially known to
> modify mails it transports. See my old rant-sig.
> 
>     OK: I know, sorry. My thinking might be a little colored by primary
> anti-iPlanet hate. Hypothesis (2) is in fact not probable at all. ;-)
> 

Thanks,

With all the help I am getting from seasoned users on this list I'm
making remarkably fast progress with mutt.. I am subscribed to a few
high-volume lists and even with only a few days' experience I am already
wasting considerably less time than I would have done with mozilla-mail
.. after five (!) years that I wasted struggling with gui apps I truly
feel like I am breathing again..!