Dear David, In message <94b57ca8-0771-4594-a066-539f1efc1105(_at_)HUBCAS2(_dot_)seas(_dot_)wustl(_dot_)edu> you wrote:
Here's my guess at what's happening: mhfixmsg only converts the character sets of text/plain parts. Did you look at that or the text/html part in vim?
I looked at the text/plain part.
I assume that your message is a multipart/alternative. If not, the
Correct.
output from mhlist -verbose might be helpful. You can also do things
like :
$ mhfixmsg +inbox 174 -textcharset utf8 -verbose -outfile - | mhlist
-verbose -file -
I've constructed a test message that shows the issue. The original
test message is "200", and my attempts to convert it (the text part)
are 201 (no specified, thus charset="iso-8859-1"; file is OK, but I
want UTF8) and 202 ( given, the text/plain parts is apparently UTF8,
but the whole message remains iso-8859-1).
Here is what I did:
-> mhfixmsg +inbox 200 -decodetext 8bit -verbose -outfile 201
mhfixmsg: 200 part 2, decode text/plain; charset="iso-8859-1"
mhfixmsg: 200 part 1, decode text/html; charset="iso-8859-1"
-> mhfixmsg +inbox 200 -decodetext 8bit -textcharset utf8 -verbose
-outfile 202
mhfixmsg: 200 part 2, decode text/plain; charset="iso-8859-1"
mhfixmsg: 200 part 1, decode text/html; charset="iso-8859-1"
mhfixmsg: 200 part 2, convert utf8 to utf8
-> mhlist -verbose 200 201 202
msg part type/subtype size description
200 multipart/alternative 1206
boundary="_000_FC5FFED413B51B4FBC991F3F78A1D46A29956C9CUK5EXCMBPR11s3m_"
1 text/html 601
charset="iso-8859-1"
2 text/plain 129
charset="iso-8859-1"
201 multipart/alternative 1121
boundary="_000_FC5FFED413B51B4FBC991F3F78A1D46A29956C9CUK5EXCMBPR11s3m_"
1 text/html 601
charset="iso-8859-1"
2 text/plain 129
charset="iso-8859-1"
202 multipart/alternative 1125
boundary="_000_FC5FFED413B51B4FBC991F3F78A1D46A29956C9CUK5EXCMBPR11s3m_"
1 text/html 601
charset="iso-8859-1"
2 text/plain 139
charset="utf8"
If you open file 202 in vim, you can see the problem:
- vim writes in the status line:
"202" [converted] 44L, 1481C
Mind the "[converted]" part.
- ":set encoding" gives: "encoding=utf-8" (because vim has converted
the file in the internal buffer)
- ":set fileencoding" gives: "fileencoding=latin1" which means that
vim has recognized the input file as "iso-8859-1" - this is IMO the
real problem; it should have recognizedit as UTF8 file, in the same
way as the original file 200.
- For file 200, we see
":set fileencoding" -> fileencoding=utf-8
":set encoding" -> encoding=utf-8
This is what the resulting output file of mhfixmsg should be,
too.
I hope you can see what my problem is...
Thanks again!
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: wd(_at_)denx(_dot_)de
It is a good thing for an uneducated man to read books of quotations.
- Sir Winston Churchill _My Early Life_ ch. 9
examples.tar.gz
Description: examples.tar.gz
_______________________________________________ Nmh-workers mailing list Nmh-workers(_at_)nongnu(_dot_)org https://lists.nongnu.org/mailman/listinfo/nmh-workers
| Previous by Date: | Re: [Nmh-workers] base64 ... just looking for advice, David Levine |
|---|---|
| Next by Date: | Re: [Nmh-workers] base64 ... just looking for advice, David Levine |
| Previous by Thread: | Re: [Nmh-workers] base64 ... just looking for advice, David Levine |
| Next by Thread: | Re: [Nmh-workers] base64 ... just looking for advice, David Levine |
| Indexes: | [Date] [Thread] [Top] [All Lists] |