From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Fwd: Re: Inadequate documentation of silly characters on screen. Date: Thu, 19 Nov 2009 15:42:31 +0000 Message-ID: <20091119154231.GA1314@muc.de> References: <20091118191258.GA2676@muc.de> <20091119082040.GA1720@muc.de> <874ooq8xay.fsf@wanchan.jasonrumney.net> <20091119141852.GC1720@muc.de> <876396tvc3.fsf@wanchan.jasonrumney.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1258647661 28252 80.91.229.12 (19 Nov 2009 16:21:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Nov 2009 16:21:01 +0000 (UTC) Cc: Andreas Schwab , Stefan Monnier , emacs-devel@gnu.org To: Jason Rumney Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 19 17:20:54 2009 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 1NB9kT-0003pO-9k for ged-emacs-devel@m.gmane.org; Thu, 19 Nov 2009 17:20:45 +0100 Original-Received: from localhost ([127.0.0.1]:32847 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NB9kS-0000H8-Pl for ged-emacs-devel@m.gmane.org; Thu, 19 Nov 2009 11:20:44 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NB94k-0007c2-6V for emacs-devel@gnu.org; Thu, 19 Nov 2009 10:37:38 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NB94f-0007Vh-TX for emacs-devel@gnu.org; Thu, 19 Nov 2009 10:37:37 -0500 Original-Received: from [199.232.76.173] (port=36027 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NB94f-0007VD-Hr for emacs-devel@gnu.org; Thu, 19 Nov 2009 10:37:33 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:4098 helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NB94d-00079x-Vm for emacs-devel@gnu.org; Thu, 19 Nov 2009 10:37:32 -0500 Original-Received: (qmail 20639 invoked by uid 3782); 19 Nov 2009 15:37:30 -0000 Original-Received: from acm.muc.de (pD9E51409.dip.t-dialin.net [217.229.20.9]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Thu, 19 Nov 2009 16:37:26 +0100 Original-Received: (qmail 1481 invoked by uid 1000); 19 Nov 2009 15:42:31 -0000 Content-Disposition: inline In-Reply-To: <876396tvc3.fsf@wanchan.jasonrumney.net> User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-detected-operating-system: by monty-python.gnu.org: FreeBSD 4.6-4.9 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:117257 Archived-At: On Thu, Nov 19, 2009 at 10:58:36PM +0800, Jason Rumney wrote: > Alan Mackenzie writes: > > At the indicated line, c is a SIGNED integer, therefore will get > > the value 0xfffffff1, not 0xf1. > Surely 0xf1 is the same, regardless of whether the integer is signed > or unsigned. Yes it is. Sorry - I just tried it out. It depends only on the signedness of the char on the RHS of the assignment. Nevertheless, I think the bug is caused by something along these lines. > Since \361 == \xf1, I don't think this is a bug where the value is > accidentally being corrupted, but one where the character is > deliberately being assigned to its corresponding raw-byte codepoint. It's getting the value -15, at least to 23 places of ones-complement. In the sequence (aset nl 0 ?ñ) (insert nl) , the character that comes out isn't the one that went in. That is a bug. -- Alan Mackenzie (Nuremberg, Germany).