From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: 23.0.50; utf7-decode failed with non latin-1 charactor Date: Wed, 07 Nov 2007 21:51:16 +0900 Message-ID: References: <87k5p1ho29.wl%topia@clovery.jp> <472B1AD5.3090006@gnu.org> <4731ABC9.4080604@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 1194439915 15952 80.91.229.12 (7 Nov 2007 12:51:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 7 Nov 2007 12:51:55 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, topia@clovery.jp To: Jason Rumney Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 07 13:51:59 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 1IpkNr-0004X9-Pc for ged-emacs-devel@m.gmane.org; Wed, 07 Nov 2007 13:51:52 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IpkNg-0007dm-Px for ged-emacs-devel@m.gmane.org; Wed, 07 Nov 2007 07:51:40 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IpkNc-0007af-3v for emacs-devel@gnu.org; Wed, 07 Nov 2007 07:51:36 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IpkNY-0007V5-I6 for emacs-devel@gnu.org; Wed, 07 Nov 2007 07:51:35 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IpkNY-0007Up-8Y for emacs-devel@gnu.org; Wed, 07 Nov 2007 07:51:32 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IpkNX-000144-W7 for emacs-devel@gnu.org; Wed, 07 Nov 2007 07:51:32 -0500 Original-Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IpkNX-0005gr-M3 for emacs-pretest-bug@gnu.org; Wed, 07 Nov 2007 07:51:31 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1IpkNU-00013S-9X for emacs-pretest-bug@gnu.org; Wed, 07 Nov 2007 07:51:31 -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 1IpkNP-000117-Ad; Wed, 07 Nov 2007 07:51:24 -0500 Original-Received: from rqsmtp2.aist.go.jp (rqsmtp2.aist.go.jp [150.29.254.123]) by mx1.aist.go.jp with ESMTP id lA7CpH9f029484; Wed, 7 Nov 2007 21:51:17 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp4.aist.go.jp by rqsmtp2.aist.go.jp with ESMTP id lA7CpGtr012976; Wed, 7 Nov 2007 21:51:17 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp4.aist.go.jp with ESMTP id lA7CpGjw016414; Wed, 7 Nov 2007 21:51:16 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken.m17n.org with local (Exim 4.67) (envelope-from ) id 1IpkNI-0003pL-8N; Wed, 07 Nov 2007 21:51:16 +0900 In-reply-to: <4731ABC9.4080604@gnu.org> (message from Jason Rumney on Wed, 07 Nov 2007 12:12:57 +0000) 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-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:82728 gmane.emacs.pretest.bugs:20251 Archived-At: In article <4731ABC9.4080604@gnu.org>, Jason Rumney writes: > Kenichi Handa wrote: > > It seems that fucntions utf-7-decode and utf-7-encode are > > designed to be called only as pre-write/post-read functions > > of a coding system utf-7 (and commented out coding system > > utf-7-imap) in lisp/international/utf-7.el. > > > Is it a requirement for such functions to return nil? > If not, can we return the encoded string instead of nil, utf-7-encode is called from pre-write functions utf-7-pre-write-conversion and utf-7-imap-pre-write-conversion, and they expects utf-7-encode to put the encoded result in a new buffer. So, it's possible to make utf-7-encode return a string, but it's inefficient to make a string that is just ignored when callled from utf-7-pre-write-conversion. > to make the > undocumented string FROM argument useful (as a drop in replacement for > the gnus utf7-encode). Why is that necessary? We can use encode-coding-string. I want to keep the entry points for encoding and decoding only to the functions decode/encode-coding-region/string. --- Kenichi Handa handa@ni.aist.go.jp