From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: string-as-unibyte Date: Tue, 19 Jul 2005 10:26:31 -0400 Message-ID: <87wtnmg9iw.fsf-monnier+emacs@gnu.org> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1121783364 11624 80.91.229.2 (19 Jul 2005 14:29:24 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 19 Jul 2005 14:29:24 +0000 (UTC) Cc: YAMAMOTO Mitsuharu , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 19 16:29:21 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Dut4v-0008St-L2 for ged-emacs-devel@m.gmane.org; Tue, 19 Jul 2005 16:28:13 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dut6u-0003c0-UG for ged-emacs-devel@m.gmane.org; Tue, 19 Jul 2005 10:30:16 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Dut6N-0003Qd-Pw for emacs-devel@gnu.org; Tue, 19 Jul 2005 10:29:44 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Dut6I-0003OK-Gf for emacs-devel@gnu.org; Tue, 19 Jul 2005 10:29:39 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dut6I-0003M8-48 for emacs-devel@gnu.org; Tue, 19 Jul 2005 10:29:38 -0400 Original-Received: from [209.226.175.4] (helo=tomts16-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DutCT-0004lO-MK for emacs-devel@gnu.org; Tue, 19 Jul 2005 10:36:01 -0400 Original-Received: from alfajor ([67.68.217.253]) by tomts16-srv.bellnexxia.net (InterMail vM.5.01.06.10 201-253-122-130-110-20040306) with ESMTP id <20050719142631.LHXW27508.tomts16-srv.bellnexxia.net@alfajor>; Tue, 19 Jul 2005 10:26:31 -0400 Original-Received: by alfajor (Postfix, from userid 1000) id 40019D7571; Tue, 19 Jul 2005 10:26:31 -0400 (EDT) Original-To: Kenichi Handa In-Reply-To: (Kenichi Handa's message of "Tue, 19 Jul 2005 11:56:37 +0900") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:41073 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:41073 > If a multibyte string is given to mac-code-convert-string, > and the string is made mutlibyte by string-to-multibyte from > the raw-byte sequence (ex. inserting a file by raw-text in a > mutlibyte buffer and extracting a string by > buffer-substring), using Fstring_as_unibyte is correct. Indeed, but sadly so. In order to make it clear that the multibyte string is expected to only contain single-byte chars (including eight-bit-* chars), a comment is in order. > Please note that we don't have Fstring_to_unibyte because it > should work the same way as Fstring_as_unibyte. Actually no. string-to-unibyte should signal an error if it encounters a non-ascii non-eight-bit-* char. Stefan