[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] base64 ... just looking for advice
From: |
Wolfgang Denk |
Subject: |
Re: [Nmh-workers] base64 ... just looking for advice |
Date: |
Fri, 22 Jan 2016 16:57:34 +0100 |
Dear David,
In message <address@hidden> you wrote:
> Hymie wrote:
>
> > So I'm just wondering what other people are doing. Are you going into
> > your raw email, stripping out HTML, undecoding base64, removing extra
> > "multipart" parts, things like that?
>
> See mhfixmsg(1) in nmh 1.6 or the current git repo. Its main motivation was
> to allow grepping of messages.
Thanks for this great hint!
Hm... I still have problems understanding how to use mhfixmsg, though.
Assume I have an incoming multipart message with parts like these:
Part 1:
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Part 2:
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
The "file" command identifies the whole message as "ASCII text", which
makes sense, as it has only 7 bit characters.
Conversion attempt 1:
$ mhfixmsg +inbox 174 -decodetext 8bit -verbose -outfile ...
mhfixmsg: 174 part 2, decode text/plain; charset="iso-8859-1"
mhfixmsg: 174 part 1, decode text/html; charset="iso-8859-1"
The resulting file is identified by "file" as "ISO-8859 text, with
very long lines"; it basically looks OK, except that I actually would
prefer to have it converted to UTF8 instead.
Conversion attempt 2:
$ mhfixmsg +inbox 174 -decodetext 8bit -textcharset utf8 -verbose
-outfile ...
The resulting file is identified by "file" as "Non-ISO extended-ASCII
text, with very long lines". Opening the file in "vim" shows that all
the 8 bit characters like the German umlaut characters are wrong;
the quoted-printable encoded "f=FCr" for example was not converted
into "für" as expected, but instead into "für".
What is needed to properly decode everything into UTF8?
Thanks in advance.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: address@hidden
"It is easier to port a shell than a shell script." - Larry Wall
- Re: [Nmh-workers] base64 ... just looking for advice, David Levine, 2016/01/19
- Re: [Nmh-workers] base64 ... just looking for advice, David Levine, 2016/01/19
- Re: [Nmh-workers] base64 ... just looking for advice, David Levine, 2016/01/19
- Re: [Nmh-workers] base64 ... just looking for advice, David Levine, 2016/01/19
- Re: [Nmh-workers] base64 ... just looking for advice, David Levine, 2016/01/22
- Re: [Nmh-workers] base64 ... just looking for advice, Wolfgang Denk, 2016/01/23