GNU bug report logs - #6576
documentation `string-to-char' is incorrect

Previous Next

Package: emacs;

Reported by: MON KEY <monkey <at> sandpframing.com>

Date: Tue, 6 Jul 2010 21:35:01 UTC

Severity: minor

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


Message #20 received at 6576 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: monkey <at> sandpframing.com, 6576 <at> debbugs.gnu.org
Subject: Re: bug#6576: documentation `string-to-char' is incorrect
Date: Wed, 07 Jul 2010 17:23:40 +0300
> From: Andreas Schwab <schwab <at> linux-m68k.org>
> Cc: monkey <at> sandpframing.com,  6576 <at> debbugs.gnu.org
> Date: Wed, 07 Jul 2010 14:16:28 +0200
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> >> From: Andreas Schwab <schwab <at> linux-m68k.org>
> >> Cc: MON KEY <monkey <at> sandpframing.com>,  6576 <at> debbugs.gnu.org
> >> Date: Wed, 07 Jul 2010 10:40:00 +0200
> >> 
> >> Eli Zaretskii <eliz <at> gnu.org> writes:
> >> 
> >> >   "Return the Unicode codepoint of the first character of STRING.
> >> 
> >> This is not correct.  The value is just the internal encoding of the
> >> character.
> >
> > Which is Unicode, AFAIK.
> 
> No, it is an extension of Unicode.  Eight-bit characters, for example,
> are not part of Unicode.

And that's why there's this note:

> >> >   Note: eight-bit characters are returned as single-byte values in the
> >> >   range 160 to 255, inclusive."
> >> 
> >> That depends on the multibyteness of the string.
> >
> > Eight-bit characters are defined as such only in multibyte strings.
> 
> That makes it even more incorrect.  For multibyte strings you'll get the
> internal encoding, which is not in the range 160 to 255.

Sounds like a bug, assuming it's true.




This bug report was last modified 14 years and 2 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.