Gnus development mailing list
 help / color / mirror / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
To: ding@gnus.org
Subject: Re: Garbled display of UTF-8 encoded mails
Date: Wed, 24 Nov 2010 13:39:21 +0900	[thread overview]
Message-ID: <b4mwro3e3nq.fsf@jpl.org> (raw)
In-Reply-To: <87vd3neord.fsf@turtle.gmx.de>

Sven Joachim wrote:
>> during the last weeks I encountered a problem viewing articles (mainly
>> mails) with non-ASCII characters, e.g. a German Umlaut "Ü" is displayed
>> as an octal digit, \334.  This happens only if the message is encoded
>> like this:
>>
>> Content-Type: text/plain; charset=utf-8
>> Content-Transfer-Encoding: 8bit

It seems to be due to a bug in sender's mailer.

(encode-coding-string "Ü" 'utf-8) => "\303\234"
(encode-coding-string "Ü" 'iso-8859-1) => "\334"

So the Content-Type header should have been labeled with iso-8859-1,
not utf-8.  If you often face such mails, there's a handy workaround.
Try adding something like the following to your ~/.gnus.el file:

(setq gnus-summary-show-article-charset-alist
      '((0 . undecided)
	(1 . iso-8859-1)
	(2 . windows-1252)
	(3 . utf-8)))

Then you can type `1 g' in the summary buffer to decode an article
by decoding by iso-8859-1 forcibly no matter what the charset the
Content-Type header says.

Cf. (info "(gnus)Paging the Article")

>> It does not happen with charset=iso-8859-1 or Content-Transfer-Encoding:
>> quoted-printable (thus you cannot reproduce it with articles from
>> Gmane).  Any idea what might have caused this?

> I bisected the problem and found out that commit bda3e8962a is the
> culprit:

> commit bda3e8962af0aee90144c3ae8c5360aa4c106d94
> Author: Katsumi Yamaoka <yamaoka@jpl.org>
> Date:   Fri May 7 06:34:41 2010 +0000

I tried old Gnus of Apr. 2010 but found no difference.



  reply	other threads:[~2010-11-24  4:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-23 20:11 Sven Joachim
2010-11-23 21:03 ` Sven Joachim
2010-11-24  4:39   ` Katsumi Yamaoka [this message]
2010-11-24  6:27     ` Sven Joachim
2010-11-24  7:03       ` Sven Joachim
2010-11-24  7:15         ` Katsumi Yamaoka
2010-11-24  7:17         ` Sven Joachim
2010-11-24  7:28           ` Katsumi Yamaoka
2010-11-24  7:58             ` Sven Joachim
2010-11-24 10:19   ` Sven Joachim
2010-11-24 12:54     ` Sven Joachim
2010-11-24 21:07       ` Lars Magne Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b4mwro3e3nq.fsf@jpl.org \
    --to=yamaoka@jpl.org \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).