I sometimes send messages that contain the lowercase 'o' with an umlaut
over it, i.e., ö, unicode char 246.  I compose my messages in vim, with
the encodings all set to utf-8.

Occasionally I can see that I message that I sent (e.g., to myself) has
been unexepectedly encoded with quoted-printable, when I have the 'ö' in
the message body.  Such messages also declare the charset as Latin1
(which, I presume, was done by mutt, using $send_charset).

Somewhere along the line, the quoted-printable translation of 'ö' gets
messed up.  Apparently, the raw text of such a message uses =C3=B6 to
encode 'ö'. (In case this gets garbled, that's "equalsign, C3,
equalsign, B6").  Mutt transparently decodes this (I guess) and shows me
an umlauted 'o' in the pager.  What's funny is that =C3=B6 is not the
correct QP-encoding for the umlauted 'o'; hence if I view the raw
message text in vim (either by pressing 'e' from the pager or by saving
to disk first), and then un-encode from QP, I get not one but two
unicode characters, and both are incorrect.  (Namely, a capital A with a
tilde on top, and some strange other thing).

As far as I can tell, the umlauted, lowercase 'o' is char 246 in both
UTF8 and Latin1.  And as far as I can tell, the correct QP-translation
of character 246 ought to be =F6 (equalsign, F6).  But the raw message
text has *two* QP characters, =C3=B6, neither of which is correct.

So my questions are these:

1) How is the QP encoding of a perfectly good UTF-8 text getting
mangled?  Is mutt screwing it up when I ask for the raw message source?

2) Given that it is mangled, how is it that mutt is nevertheless able to
decode and display it properly?

I note that I'm on MacOSX 10.5, with $LANG as en_US.UTF-8 in
Terminal.app.  I also note that I get the mangling whether I use console
vim or the MacVim GUI.

-Jack


Reply via email to