From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: Coding system conversion error (was Re: abort in x_handle_selection_event when copying text) Date: Thu, 10 Feb 2005 01:01:40 -0500 Message-ID: References: <20050205170221.ZTBD24781.mxfep02.bredband.com@coolsville.localdomain> <738f9db09f1986269b8f5719d45d2dd5@swipnet.se> <4207DAF0.6000204@swipnet.se> <4209342E.5010701@swipnet.se> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1108015882 16099 80.91.229.2 (10 Feb 2005 06:11:22 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 10 Feb 2005 06:11:22 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 10 07:11:21 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Cz7X5-0003Wk-7s for ged-emacs-devel@m.gmane.org; Thu, 10 Feb 2005 07:10:31 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Cz7lk-0000EA-TJ for ged-emacs-devel@m.gmane.org; Thu, 10 Feb 2005 01:25:40 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Cz7k6-0007sc-6V for emacs-devel@gnu.org; Thu, 10 Feb 2005 01:23:58 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Cz7jx-0007od-7D for emacs-devel@gnu.org; Thu, 10 Feb 2005 01:23:49 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Cz7jw-0007iy-NQ; Thu, 10 Feb 2005 01:23:48 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Cz7S3-0004oc-Ed; Thu, 10 Feb 2005 01:05:19 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1Cz7OW-0002kg-05; Thu, 10 Feb 2005 01:01:40 -0500 Original-To: "Jan D." In-reply-to: <4209342E.5010701@swipnet.se> (jan.h.d@swipnet.se) 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 X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: main.gmane.org gmane.emacs.devel:33180 gmane.emacs.pretest.bugs:5810 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:33180 It is possible for a multibyte string to have NBYTES = NCHARS. The clean fix is for the args to allocate_string_data to indicate explicitly whether the string is unibyte or multibyte. This could be done with another argument, or by specifying -1 for NBYTES when the string is unibyte.