From: Katsumi Yamaoka <yamaoka@jpl.org>
To: ding@gnus.org
Subject: Re: gnus should accept UTF8 even if UTF-8 is standard
Date: Tue, 16 Dec 2008 08:35:54 +0900 [thread overview]
Message-ID: <b4moczd57vp.fsf@jpl.org> (raw)
In-Reply-To: <b4m1vyaolxy.fsf@jpl.org>
>>>>> In <E1LCJN1-0002Yy-00@quimby.gnus.org> (in gmane.emacs.gnus.cvs)
>>>>> Reiner Steib wrote:
> Date: Monday, December 15, 2008 @ 20:44:47
> Author: cvs
> Path: /usr/local/cvsroot/gnus/lisp
> Modified: ChangeLog mm-util.el
> (mm-charset-synonym-alist): Add bogus names "UTF8" and "ISO_8859-1".
This change potentially makes Gnus be a shameful newsreader that
sends messages with bogus charsets. I must cope with it.
>>>>> In <b4mhc7dpf7w.fsf@jpl.org> Katsumi Yamaoka wrote:
> Type `C-c C-m p text/plain RET' in the message buffer and add
> charset=utf8 manually as follows:
> < #part type="text/plain" disposition=inline charset=utf8>
> In this case the message will be sent with charset=utf8 .
>>>>> In <873air44me.fsf@marauder.physik.uni-ulm.de>
>>>>> Reiner Steib wrote:
>> I'm surprised that `mm-charset-synonym-alist' has any effect on
>> outgoing messages. I though it would only be used when displaying an
>> article. Could you please investigate this?
>>>>> In <b4m1vyaolxy.fsf@jpl.org> Katsumi Yamaoka wrote:
> That is due to `mml-generate-mime-1' that uses the charset specified
> as is (for encoding, it uses the valid coding system derived from
> that charset according to `mm-charset-synonym-alist', though).
> It's a bug, I have two solutions, and I like the second one:
> 1. Bind `mm-charset-synonym-alist' (and `mm-charset-eval-alist')
> to nil when encoding. And signal an error if the charset is
> invalid.
> 2. Replace the charset that is an alias with the valid one that
> Emacs knows. Although it violates the idea that "the charset
> aliases would be used only when displaying an article", it
> will be convenience for users.
> WDYT? The patches for 1. and 2. are below:
I've installed 2. The code and the comment have been slightly
modified.
> Patch1:
> --- mml.el~ 2008-10-03 05:47:11 +0000
> +++ mml.el 2008-10-20 23:58:29 +0000
> @@ -476,8 +476,11 @@
> "application/octet-stream")
> "text/plain")))
> (charset (cdr (assq 'charset cont)))
> - (coding (mm-charset-to-coding-system charset))
> + (coding (let (mm-charset-eval-alist mm-charset-synonym-alist)
> + (mm-charset-to-coding-system charset)))
> encoding flowed coded)
> + (unless coding
> + (error "Unknown charset: %s" charset))
> (cond ((eq coding 'ascii)
> (setq charset nil
> coding nil))
> Patch2:
> --- mml.el~ 2008-10-03 05:47:11 +0000
> +++ mml.el 2008-10-20 23:58:29 +0000
> @@ -482,7 +482,12 @@
> (setq charset nil
> coding nil))
> (charset
> - (setq charset (intern (downcase charset)))))
> + ;; `charset' might be an alias that `mm-charset-synonym-alist'
> + ;; provides and might not be in common use, so we prefer
> + ;; the one that Emacs knows for `coding'.
> + (setq charset (if coding
> + (mm-coding-system-to-mime-charset coding)
> + (intern (downcase charset))))))
> (if (and (not raw)
> (member (car (split-string type "/")) '("text" "message")))
> (progn
Regards,
next prev parent reply other threads:[~2008-12-15 23:35 UTC|newest]
Thread overview: 72+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-14 20:30 jidanni
2008-10-14 20:50 ` Ted Zlatanov
2008-10-15 0:39 ` Kenichi Handa
2008-10-15 16:10 ` Richard M. Stallman
2008-10-15 17:32 ` Ted Zlatanov
2008-10-15 19:49 ` Reiner Steib
2008-10-15 19:05 ` Ted Zlatanov
2008-10-15 22:03 ` Reiner Steib
2008-10-15 21:23 ` Ted Zlatanov
2008-10-16 0:15 ` Katsumi Yamaoka
2008-10-20 16:23 ` Reiner Steib
2008-10-21 0:01 ` Katsumi Yamaoka
2008-12-15 23:35 ` Katsumi Yamaoka [this message]
2008-10-16 4:32 ` Stephen J. Turnbull
2008-10-16 6:47 ` Eli Zaretskii
2008-10-16 13:01 ` Ted Zlatanov
2008-10-16 2:41 ` Stefan Monnier
2008-10-16 14:27 ` Richard M. Stallman
2008-10-16 15:41 ` Stefan Monnier
2008-10-16 17:47 ` Eli Zaretskii
2008-10-17 19:59 ` Richard M. Stallman
2008-10-18 19:01 ` Stefan Monnier
2008-10-20 1:14 ` Richard M. Stallman
2008-10-20 3:21 ` Stefan Monnier
2008-10-20 8:42 ` Eli Zaretskii
2008-10-20 17:04 ` Richard M. Stallman
2008-10-21 4:39 ` Stephen J. Turnbull
2008-10-21 5:23 ` Miles Bader
2008-10-21 6:25 ` tomas
2008-10-21 6:21 ` Miles Bader
2008-10-21 7:44 ` tomas
2008-10-21 8:15 ` Eli Zaretskii
2008-10-21 9:06 ` Stephen J. Turnbull
2008-10-21 10:22 ` Eli Zaretskii
2008-10-21 12:06 ` Stephen J. Turnbull
2008-10-21 12:40 ` Eli Zaretskii
2008-10-22 2:34 ` Stephen J. Turnbull
2008-10-22 4:33 ` Eli Zaretskii
2008-10-22 21:02 ` Richard M. Stallman
2008-10-22 0:32 ` Kenichi Handa
2008-10-22 4:27 ` Eli Zaretskii
2009-01-27 4:51 ` Kenichi Handa
2008-10-21 8:06 ` Stephen J. Turnbull
2008-10-20 16:00 ` Reiner Steib
2008-10-20 22:03 ` Richard M. Stallman
2008-10-21 2:50 ` Kenichi Handa
2008-10-21 16:00 ` Ted Zlatanov
2008-10-22 1:22 ` Kenichi Handa
2008-10-22 2:07 ` Stephen J. Turnbull
2008-10-22 6:21 ` Richard M. Stallman
2008-10-23 2:34 ` Kenichi Handa
2008-10-23 21:08 ` Richard M. Stallman
2008-10-24 0:54 ` Kenichi Handa
2008-10-24 18:36 ` Richard M. Stallman
2008-10-22 13:15 ` Stefan Monnier
2008-10-24 17:21 ` Ted Zlatanov
2008-10-25 2:01 ` Richard M. Stallman
2008-10-25 2:32 ` Kenichi Handa
2008-10-26 4:10 ` Richard M. Stallman
2008-10-31 6:33 ` Kenichi Handa
2008-10-31 7:24 ` Miles Bader
2008-10-31 19:31 ` Richard M. Stallman
2008-11-01 2:17 ` Kenichi Handa
2008-11-02 1:53 ` Richard M. Stallman
2008-11-07 7:15 ` Kenichi Handa
2008-11-07 17:04 ` Richard M. Stallman
2008-10-25 18:27 ` Stefan Monnier
2008-10-26 4:10 ` Richard M. Stallman
2008-10-31 21:29 ` Stefan Monnier
2008-11-10 5:43 ` Kenichi Handa
2008-11-10 15:01 ` Stefan Monnier
2008-10-16 1:12 ` Kenichi Handa
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=b4moczd57vp.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).