From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/65574 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel,gmane.emacs.gnus.general 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 Message-ID: References: <87k5p1ho29.wl%topia@clovery.jp> <472B1AD5.3090006@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1194395877 4617 80.91.229.12 (7 Nov 2007 00:37:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 7 Nov 2007 00:37:57 +0000 (UTC) Cc: jasonr@gnu.org, topia@clovery.jp, ding@gnus.org, emacs-devel@gnu.org To: Reiner Steib Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 07 01:38:00 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IpYvd-0006Tx-TZ for ged-emacs-devel@m.gmane.org; Wed, 07 Nov 2007 01:37:58 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IpYvT-0006aZ-9l for ged-emacs-devel@m.gmane.org; Tue, 06 Nov 2007 19:37:47 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IpYup-0005oQ-8g for emacs-devel@gnu.org; Tue, 06 Nov 2007 19:37:07 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IpYuo-0005nJ-F8 for emacs-devel@gnu.org; Tue, 06 Nov 2007 19:37:06 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IpYuo-0005mu-Al for emacs-devel@gnu.org; Tue, 06 Nov 2007 19:37:06 -0500 Original-Received: from mx1.aist.go.jp ([150.29.246.133]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IpYui-0007hd-Oz; Tue, 06 Nov 2007 19:37:01 -0500 Original-Received: from rqsmtp2.aist.go.jp (rqsmtp2.aist.go.jp [150.29.254.123]) by mx1.aist.go.jp with ESMTP id lA70ak9g020374; Wed, 7 Nov 2007 09:36:46 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp4.aist.go.jp by rqsmtp2.aist.go.jp with ESMTP id lA70ak3F001971; Wed, 7 Nov 2007 09:36:46 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp4.aist.go.jp with ESMTP id lA70aUdb022804; Wed, 7 Nov 2007 09:36:30 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken.m17n.org with local (Exim 4.67) (envelope-from ) id 1IpYuE-0001U7-MY; Wed, 07 Nov 2007 09:36:30 +0900 In-reply-to: (message from Reiner Steib on Tue, 06 Nov 2007 20:53:08 +0100) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/23.0.60 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) X-detected-kernel: by monty-python.gnu.org: Solaris 8 (1) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:82697 gmane.emacs.gnus.general:65574 Archived-At: In article , Reiner Steib 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