From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jason Rumney Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: 23.0.50; utf7-decode failed with non latin-1 charactor Date: Fri, 02 Nov 2007 12:40:53 +0000 Message-ID: <472B1AD5.3090006@gnu.org> References: <87k5p1ho29.wl%topia@clovery.jp> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1194007285 18940 80.91.229.12 (2 Nov 2007 12:41:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 2 Nov 2007 12:41:25 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org To: Topia Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 02 13:41:27 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 1Invpy-0003yX-Mi for ged-emacs-devel@m.gmane.org; Fri, 02 Nov 2007 13:41:22 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Invpo-0002VM-PG for ged-emacs-devel@m.gmane.org; Fri, 02 Nov 2007 08:41:12 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Invpl-0002Ta-1m for emacs-devel@gnu.org; Fri, 02 Nov 2007 08:41:09 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Invpi-0002Qr-LQ for emacs-devel@gnu.org; Fri, 02 Nov 2007 08:41:08 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Invpi-0002Qa-9f for emacs-devel@gnu.org; Fri, 02 Nov 2007 08:41:06 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Invph-0003kB-Mg for emacs-devel@gnu.org; Fri, 02 Nov 2007 08:41:05 -0400 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 1Invph-00027e-Ch for emacs-pretest-bug@gnu.org; Fri, 02 Nov 2007 08:41:05 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Invpa-0003gd-M5 for emacs-pretest-bug@gnu.org; Fri, 02 Nov 2007 08:41:04 -0400 Original-Received: from outmail1.freedom2surf.net ([194.106.33.237]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1InvpZ-0003fq-Sd for emacs-pretest-bug@gnu.org; Fri, 02 Nov 2007 08:40:58 -0400 Original-Received: from [127.0.0.1] (i-83-67-23-108.freedom2surf.net [83.67.23.108]) by outmail1.freedom2surf.net (Postfix) with ESMTP id 6ACA1523DD; Fri, 2 Nov 2007 12:40:56 +0000 (GMT) User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) In-Reply-To: <87k5p1ho29.wl%topia@clovery.jp> X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 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:82349 gmane.emacs.pretest.bugs:20222 Archived-At: Topia wrote: > I want to use imap's internationalized (japanese) folder name, > from Wanderlust. but I see error "Unable to convert from Unicode" > from utf7-u16-latin1-char-converter. > > You can see with this code: > ;; "Sent Mail" in Japanese, imap's UTF-7 > (utf7-decode "&kAFP4W4IMH8w4TD8MOs-" 'imap) > There appear to be two different implementations of utf-7 in Emacs, one in lisp/international/utf-7.el, and one in lisp/gnus/utf7.el The former seems to work for decoding, but always returns nil on encoding without changing the buffer contents (the correctly encoded text is in a buffer called " *temp*" however). The latter only seems to work on Latin-1 text (as documented in the commentary) and returns results from the encoder that are inconsistent with iconv. Probably lisp/international/utf-7.el should be fixed, and the Gnus one dropped.