From: Kenichi Handa <handa@ni.aist.go.jp>
To: Reiner Steib <Reiner.Steib@gmx.de>
Cc: jasonr@gnu.org, topia@clovery.jp, ding@gnus.org, emacs-devel@gnu.org
Subject: Re: imap.el: international/utf-7.el vs. gnus/utf7.el (was: 23.0.50; utf7-decode failed with non latin-1 charactor)
Date: Wed, 07 Nov 2007 09:36:30 +0900 [thread overview]
Message-ID: <E1IpYuE-0001U7-MY@etlken.m17n.org> (raw)
In-Reply-To: <v9prynjgm3.fsf_-_@marauder.physik.uni-ulm.de> (message from Reiner Steib on Tue, 06 Nov 2007 20:53:08 +0100)
In article <v9prynjgm3.fsf_-_@marauder.physik.uni-ulm.de>, Reiner Steib <reinersteib+gmane@imap.cc> writes:
> > I think the right thing is to uncomment all codes for
> > utf-7-map in utf-7.el, and modify gnus to use normal
> > encode/decode-coding-region/string with utf-7-imap.
> >
> > I've just committed the former change.
> AFAIKS, `utf-7-encode' also accepts that FROM is a string, but it's
> not documented. Can we rely on this? Could you document it, please?
No, don't use utf-7-encode directly but use
encode-coding-string.
For instance, this:
> +(defun utf7-encode-NEW (string &optional for-imap)
> + (with-temp-buffer
> + ;; (utf-7-encode FROM TO IMAP)
> + ;;
> + ;; `utf-7-encode' also accepts that FROM is a string, but it's not
> + ;; documented.
> + (utf-7-encode string nil for-imap)
> + (buffer-string)))
can simply be:
(defun utf7-encode-NEW (string &optional for-imap)
(encode-coding-string string (if for-imap 'utf-7-imap 'utf-7)))
And the test for the availability is:
(and (coding-system-p 'utf-7) (coding-system-p 'utf-7-imap))
---
Kenichi Handa
handa@ni.aist.go.jp
next prev parent reply other threads:[~2007-11-07 0:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-01 17:29 23.0.50; utf7-decode failed with non latin-1 charactor Topia
2007-11-02 12:40 ` Jason Rumney
2007-11-03 3:58 ` Richard Stallman
2007-11-05 7:02 ` Kenichi Handa
2007-11-06 19:53 ` imap.el: international/utf-7.el vs. gnus/utf7.el (was: 23.0.50; utf7-decode failed with non latin-1 charactor) Reiner Steib
2007-11-07 0:36 ` Kenichi Handa [this message]
2007-11-20 21:08 ` imap.el: international/utf-7.el vs. gnus/utf7.el Reiner Steib
2007-11-07 12:12 ` 23.0.50; utf7-decode failed with non latin-1 charactor Jason Rumney
2007-11-07 12:51 ` 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=E1IpYuE-0001U7-MY@etlken.m17n.org \
--to=handa@ni.aist.go.jp \
--cc=Reiner.Steib@gmx.de \
--cc=ding@gnus.org \
--cc=emacs-devel@gnu.org \
--cc=jasonr@gnu.org \
--cc=topia@clovery.jp \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.