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 #23 received at 6576 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: schwab <at> linux-m68k.org, monkey <at> sandpframing.com
Cc: 6576 <at> debbugs.gnu.org
Subject: Re: bug#6576: documentation `string-to-char' is incorrect
Date: Wed, 07 Jul 2010 18:46:44 +0300
> Date: Wed, 07 Jul 2010 17:23:40 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: monkey <at> sandpframing.com, 6576 <at> debbugs.gnu.org
> 
> > >> >   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.

Actually, there's no way we could return the eight-bit characters in
the 160 to 255 range, since that range is already taken by Unicode
codepoints of Latin characters.  So how about

  "Return the codepoint of the first character of STRING.

  Value is the Unicode codepoint, if it is below #x110000 (in hex).
  Codepoints beyond that are Emacs extensions of Unicode.  In
  particular, eight-bit characters are returned as codepoints in
  the range #x3FFF80 through #x3FFFFF, inclusive."




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.