Gnus development mailing list
 help / color / mirror / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
To: ding@gnus.org
Subject: [bugfixed] mm-charset-override-alist isn't used in decoding headers
Date: Wed, 10 Dec 2008 19:03:17 +0900	[thread overview]
Message-ID: <b4m3agwe49m.fsf@jpl.org> (raw)

Hi,

I receive Japanese mails that are labeled with charset=gb2312,
however most of them use charset=gbk in reality.  So, Gnus normally
fails in decoding those messages.  Adding the `(gb2312 . gbk)' pair
to `mm-charset-override-alist' solves it in decoding bodies, however
it is not effective in decoding headers.  Here is an example:

(rfc2047-decode-string "=?gb2312?b?srubcg==?=")

I've fixed the rfc2047 decoder so as to use `mm-charset-override-alist'.

In addition, I've added the `(gb2312 . gbk)' pair to the custom
choices (not the default value) of `mm-charset-override-alist'.
Although the `gbk' charset is a superset of the `gb2312' charset,
the reason I didn't add the pair to the default value of
`mm-charset-override-alist' is that the `gbk' is not available in
Emacs 21 normally and there seemed to be no smart way to exclude
it in such Emacs versions.

(Note that that I mention here is the `gbk' charset, not the `gbk'
 coding system.  So, `mm-charset-to-coding-system' is the best
 choice for checking whether it is available or not.  However,
 when loading mm-util,elc the default value section and/or the
 `:set' section of `(defcustom mm-charset-override-alist ...)'
 are processed before defining that function.)

Regards,



             reply	other threads:[~2008-12-10 10:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-10 10:03 Katsumi Yamaoka [this message]
2008-12-12 18:29 ` Reiner Steib
2008-12-15  4:16   ` Katsumi Yamaoka

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=b4m3agwe49m.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).