[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
mail back to UTF-8 before save to HD
From: |
Emanuel Berg |
Subject: |
mail back to UTF-8 before save to HD |
Date: |
Thu, 04 Feb 2016 04:37:34 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
(case 1) If I write a mail with the Swedish chars "å",
"ä", or "ö", as in
äåö
ÅÅÖ
the mail gets the headers:
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
(case 2) But if I don't use any of them chars, there
is only:
Content-Type: text/plain
However when the mail from (case 1) is archived in my
nnml group mail.sent, the UTF-8 isn't restored but the
"quoted-printable" style remains:
=C3=A4=C3=A5=C3=B6
=C3=84=C3=85=C3=96
I wrote this zsh to restore it:
back-to-swedish () {
local files=($@)
sed -e 's/=C3=A5/å/g; s/=C3=A4/ä/g; s/=C3=B6/ö/g' \
-e 's/=C3=85/Å/g; s/=C3=84/Å/g; s/=C3=96/Ö/g' \
-e 's/=20/ /g' $files
}
(I don't know why the whitespace at the end of the
signature delimiter must be restored as well. It gets
sent and archived as =20.)
My question is, how can I automatize this so the UTF-8
is restored automatically if it was used in the
original message?
--
underground experts united
http://user.it.uu.se/~embe8573
- mail back to UTF-8 before save to HD,
Emanuel Berg <=
- Re: mail back to UTF-8 before save to HD, Peter Münster, 2016/02/04
- Re: mail back to UTF-8 before save to HD, Emanuel Berg, 2016/02/04
- Re: mail back to UTF-8 before save to HD, Emanuel Berg, 2016/02/05
- Re: mail back to UTF-8 before save to HD, Teemu Likonen, 2016/02/05
- Re: mail back to UTF-8 before save to HD, Emanuel Berg, 2016/02/05
- Re: mail back to UTF-8 before save to HD, Adam Sjøgren, 2016/02/05
- Re: mail back to UTF-8 before save to HD, Emanuel Berg, 2016/02/05
- Re: mail back to UTF-8 before save to HD, Adam Sjøgren, 2016/02/06
- Re: mail back to UTF-8 before save to HD, Emanuel Berg, 2016/02/06
- Re: mail back to UTF-8 before save to HD, Adam Sjøgren, 2016/02/06