From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#6576: documentation `string-to-char' is incorrect Date: Wed, 07 Jul 2010 18:46:44 +0300 Message-ID: <83wrt770rf.fsf@gnu.org> References: <83630r934x.fsf@gnu.org> <834ogb8txc.fsf@gnu.org> <83y6dn74lv.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1278518405 30642 80.91.229.12 (7 Jul 2010 16:00:05 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 7 Jul 2010 16:00:05 +0000 (UTC) Cc: 6576@debbugs.gnu.org To: schwab@linux-m68k.org, monkey@sandpframing.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 07 18:00:02 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OWX2V-0005NI-TM for geb-bug-gnu-emacs@m.gmane.org; Wed, 07 Jul 2010 18:00:00 +0200 Original-Received: from localhost ([127.0.0.1]:43060 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OWX2V-0001Fu-Bi for geb-bug-gnu-emacs@m.gmane.org; Wed, 07 Jul 2010 11:59:59 -0400 Original-Received: from [140.186.70.92] (port=40484 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OWX2P-0001Fo-Vx for bug-gnu-emacs@gnu.org; Wed, 07 Jul 2010 11:59:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OWX2O-0001pT-Og for bug-gnu-emacs@gnu.org; Wed, 07 Jul 2010 11:59:53 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44663) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OWX2O-0001pO-NK for bug-gnu-emacs@gnu.org; Wed, 07 Jul 2010 11:59:52 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OWWrt-00066G-Qn; Wed, 07 Jul 2010 11:49:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 07 Jul 2010 15:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6576 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6576-submit@debbugs.gnu.org id=B6576.127851774023442 (code B ref 6576); Wed, 07 Jul 2010 15:49:01 +0000 Original-Received: (at 6576) by debbugs.gnu.org; 7 Jul 2010 15:49:00 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OWWrs-000663-6Q for submit@debbugs.gnu.org; Wed, 07 Jul 2010 11:49:00 -0400 Original-Received: from mtaout23.012.net.il ([80.179.55.175]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OWWrq-00065y-9Z for 6576@debbugs.gnu.org; Wed, 07 Jul 2010 11:48:59 -0400 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0L57004002GYN800@a-mtaout23.012.net.il> for 6576@debbugs.gnu.org; Wed, 07 Jul 2010 18:48:45 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([77.127.120.144]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L570017V2L8PTA0@a-mtaout23.012.net.il>; Wed, 07 Jul 2010 18:48:45 +0300 (IDT) In-reply-to: <83y6dn74lv.fsf@gnu.org> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Wed, 07 Jul 2010 11:49:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:38292 Archived-At: > Date: Wed, 07 Jul 2010 17:23:40 +0300 > From: Eli Zaretskii > Cc: monkey@sandpframing.com, 6576@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."