From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: (aset UNIBYTE-STRING MULTIBYTE-CHAR) Date: Wed, 13 Feb 2008 11:36:27 +0900 Message-ID: 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 1202870230 2700 80.91.229.12 (13 Feb 2008 02:37:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Feb 2008 02:37:10 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 13 03:37:33 2008 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 1JP7V4-0006Ai-HG for ged-emacs-devel@m.gmane.org; Wed, 13 Feb 2008 03:37:30 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JP7Ua-0003lM-UI for ged-emacs-devel@m.gmane.org; Tue, 12 Feb 2008 21:37:00 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JP7UW-0003in-K5 for emacs-devel@gnu.org; Tue, 12 Feb 2008 21:36:56 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JP7UV-0003hR-LP for emacs-devel@gnu.org; Tue, 12 Feb 2008 21:36:55 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JP7UV-0003hC-9N for emacs-devel@gnu.org; Tue, 12 Feb 2008 21:36:55 -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 1JP7UP-0007mA-Ul for emacs-devel@gnu.org; Tue, 12 Feb 2008 21:36:55 -0500 Original-Received: from rqsmtp1.aist.go.jp (rqsmtp1.aist.go.jp [150.29.254.115]) by mx1.aist.go.jp with ESMTP id m1D2adFf020224 for ; Wed, 13 Feb 2008 11:36:41 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp3.aist.go.jp by rqsmtp1.aist.go.jp with ESMTP id m1D2ad3R001101 for ; Wed, 13 Feb 2008 11:36:39 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp3.aist.go.jp with ESMTP id m1D2aRBt024598 for ; Wed, 13 Feb 2008 11:36:27 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken.m17n.org with local (Exim 4.68) (envelope-from ) id 1JP7U3-0003SN-PL for emacs-devel@gnu.org; Wed, 13 Feb 2008 11:36:27 +0900 X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.aist.go.jp id m1D2adFf020224 X-detected-kernel: by monty-python.gnu.org: Solaris 8 (1) 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:88925 Archived-At: Before the unicode merge, this worked: (let ((str "a")) (aset str 0 (decode-char 'ucs #x100))) In emacs-unicode-2 branch, there was a discussion about the rightness of aset changing the multibyteness of a string, and I changed the code to signal an error in the above case. But, I got reports claiming that the change breaks some of already existing Elisp packages. Although changing the current code again to make the above code work, it causes another problem in this case: (let ((str "a")) (aset str 0 #xC0)) Currently, it changes STR to the unibyte string "\300" (that is the same as before unicode merge), but if we allow changing the string multibyteness, perhaps STR must be changed to the multibyte string of A-grave "=C3=80" because the character code of A-grave is #xC0. But, that means we loose a way to easily manipulate raw byte data in a unibyte string. What do you think is the right thing for this matter? --- Kenichi Handa handa@ni.aist.go.jp