emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fwd: Re: Inadequate documentation of silly characters on screen.


From: Alan Mackenzie
Subject: Re: Fwd: Re: Inadequate documentation of silly characters on screen.
Date: Thu, 19 Nov 2009 15:42:31 +0000
User-agent: Mutt/1.5.9i

On Thu, Nov 19, 2009 at 10:58:36PM +0800, Jason Rumney wrote:
> Alan Mackenzie <address@hidden> 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).




reply via email to

[Prev in Thread] Current Thread [Next in Thread]