Gnus development mailing list
 help / color / mirror / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
To: ding@gnus.org
Subject: header encoding problem, multi-lingual text
Date: Fri, 02 Aug 2013 17:36:32 +0900	[thread overview]
Message-ID: <b4md2pwbib3.fsf@jpl.org> (raw)

Hi,

Say I reply to a Chinese friend, who reads and writes Japanese as
well, with a subject like this:

Subject: Re: 答复: No Gnus T-シャツ

"答复:" seems to mean "Re:", so I remove the first one:

Subject: 答复: No Gnus T-シャツ

I realized today that this subject of a message sent to the recipient
is not decoded fully if the recipient uses M$ Outlook; it is shown
in that mailer as follows:

Subject: 答复: No Gnus T-・$B%7%c・(B・$B%D・(B

What happens is that Gnus encodes the subject into[1]

Subject: =?utf-8?B?562U5aSNOg==?= No Gnus =?iso-2022-jp?B?VC0bJEIlNyVjGyhC?=
 =?iso-2022-jp?B?GyRCJUQbKEI=?=

and M$ Outlook decodes it from a charset that is first found in
those encoded words, I believe.  This must not be Gnus' fault,
however it gets to be a real annoyance; that broken subject will
never be fixed while repeating of replies each other.

Then, I made a change in rfc2047.el's header encoder[2] so that
it unifies the charsets into a single one used to encode the
whole text in a header as much as possible.  As for the subject,
containing Chinese and Japanese texts, now `utf-8' will be chosen.

[1] In the Japanese locale, `mm-coding-system-priorities' defaults
    to `(iso-8859-1 iso-2022-jp iso-2022-jp-2 shift_jis utf-8)',
    so `iso-2022-jp' is applied to Japanese text and `utf-8' is
    applied to Chinese text.

[2] `rfc2047-encode-message-header'.  That is an aliasee of
    `mail-encode-encoded-word-buffer'.



                 reply	other threads:[~2013-08-02  8:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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