From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/65645 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel,gmane.emacs.gnus.general Subject: Re: [Unicode-2] `read' always returns multibyte symbol Date: Tue, 13 Nov 2007 10:10:58 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1194966701 15891 80.91.229.12 (13 Nov 2007 15:11:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 13 Nov 2007 15:11:41 +0000 (UTC) Cc: Katsumi Yamaoka , ding@gnus.org, emacs-devel@gnu.org To: Kenichi Handa Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 13 16:11:46 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 1IrxQR-0007zi-7a for ged-emacs-devel@m.gmane.org; Tue, 13 Nov 2007 16:11:39 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IrxQE-0005Pn-HY for ged-emacs-devel@m.gmane.org; Tue, 13 Nov 2007 10:11:26 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IrxPw-0005Hd-7V for emacs-devel@gnu.org; Tue, 13 Nov 2007 10:11:08 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IrxPu-0005Gs-KM for emacs-devel@gnu.org; Tue, 13 Nov 2007 10:11:07 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IrxPu-0005Gn-F7 for emacs-devel@gnu.org; Tue, 13 Nov 2007 10:11:06 -0500 Original-Received: from mercure.iro.umontreal.ca ([132.204.24.67]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IrxPu-0001Rk-7H for emacs-devel@gnu.org; Tue, 13 Nov 2007 10:11:06 -0500 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id D5AC92CF6C6; Tue, 13 Nov 2007 10:11:05 -0500 (EST) Original-Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id 55AB13FE0; Tue, 13 Nov 2007 10:10:58 -0500 (EST) Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 414A46CAA5; Tue, 13 Nov 2007 10:10:58 -0500 (EST) In-Reply-To: (Kenichi Handa's message of "Tue, 13 Nov 2007 21:55:44 +0900") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-2.82, requis 5, autolearn=not spam, ALL_TRUSTED -2.82) X-DIRO-MailScanner-From: monnier@iro.umontreal.ca X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) 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:83126 gmane.emacs.gnus.general:65645 Archived-At: > That is because `read' decides the name is unibyte or multibyte by > whether the name is a valid multibyte sequence or not. Yuck. > The bug to fix is that the following code also returns t in > emacs-unicode-2. > < --8<---------------cut here---------------start------------->8--- > < (let ((string (encode-coding-string "local.=E3=83=86=E3=82=B9=E3=83=88"= 'utf-8))) > < (with-temp-buffer > < (set-buffer-multibyte nil) > < (insert string) > < (goto-char (point-min)) > < (multibyte-string-p (symbol-name (read (current-buffer)))))) > < --8<---------------cut here---------------end--------------->8--- Yes, that's a clear bug. Stefan