From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Jan D." Newsgroups: gmane.emacs.pretest.bugs,gmane.emacs.devel Subject: Re: Coding system conversion error Date: Sat, 12 Feb 2005 08:36:27 +0100 Message-ID: <30e47fd1ee5ebcc03c15fe8c905bc525@swipnet.se> References: <20050205170221.ZTBD24781.mxfep02.bredband.com@coolsville.localdomain> <738f9db09f1986269b8f5719d45d2dd5@swipnet.se> <4207DAF0.6000204@swipnet.se> <4209342E.5010701@swipnet.se> <165be0ad579be34852d18cc600114175@swipnet.se> <420BD292.6040607@swipnet.se> <200502120157.KAA24490@etlken.m17n.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v619.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1108194073 24409 80.91.229.2 (12 Feb 2005 07:41:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 12 Feb 2005 07:41:13 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-pretest-bug-bounces+gebp-emacs-pretest-bug=gmane.org@gnu.org Sat Feb 12 08:41:11 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Czrtn-0000ao-Dn for gebp-emacs-pretest-bug@gmane.org; Sat, 12 Feb 2005 08:41:03 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Czs8t-0006Sl-2k for gebp-emacs-pretest-bug@gmane.org; Sat, 12 Feb 2005 02:56:39 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Czs6n-0005Pw-L1 for emacs-pretest-bug@gnu.org; Sat, 12 Feb 2005 02:54:29 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Czs5c-0005CW-LR for emacs-pretest-bug@gnu.org; Sat, 12 Feb 2005 02:53:16 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Czs5K-00055M-8V; Sat, 12 Feb 2005 02:52:58 -0500 Original-Received: from [195.54.107.73] (helo=mxfep02.bredband.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CzrpR-0008Bl-CY; Sat, 12 Feb 2005 02:36:33 -0500 Original-Received: from coolsville.localdomain ([83.226.180.210] [83.226.180.210]) by mxfep02.bredband.com with ESMTP id <20050212073631.JRBV17521.mxfep02.bredband.com@coolsville.localdomain>; Sat, 12 Feb 2005 08:36:31 +0100 In-Reply-To: <200502120157.KAA24490@etlken.m17n.org> Original-To: Kenichi Handa X-Mailer: Apple Mail (2.619.2) X-BeenThere: emacs-pretest-bug@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: emacs-pretest-bug.gnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-pretest-bug-bounces+gebp-emacs-pretest-bug=gmane.org@gnu.org Errors-To: emacs-pretest-bug-bounces+gebp-emacs-pretest-bug=gmane.org@gnu.org X-MailScanner-To: gebp-emacs-pretest-bug@gmane.org Xref: main.gmane.org gmane.emacs.pretest.bugs:5836 gmane.emacs.devel:33276 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:33276 > At first, I think xassert in lisp_data_to_selection_data > (xselect.c) is wrong. Here, obj is generated by a Lisp code > that may generate a multibyte string by error (as in the > current case). But, in general, an error in Lisp code > should not lead to abort. So, I propose this change. I > choose string_make_unibyte instead of string_as_unibyte to > avoid exporting Emacs' internal leading bytes. > > *** xselect.c 12 Feb 2005 09:54:46 +0900 1.148 > --- xselect.c 12 Feb 2005 10:39:47 +0900 > *************** > *** 1908,1914 **** > } > else if (STRINGP (obj)) > { > ! xassert (! STRING_MULTIBYTE (obj)); > if (NILP (type)) > type = QSTRING; > *format_ret = 8; > --- 1908,1915 ---- > } > else if (STRINGP (obj)) > { > ! if (STRING_MULTIBYTE (obj)) > ! obj = string_make_unibyte (obj); > if (NILP (type)) > type = QSTRING; > *format_ret = 8; If the multibyte string is generated by an error and this is one of the places where we can detect the error, should we not keep the xassert? Jan D.