From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: emacs-26 8f18d12: Improve documentation of decoding into a unibyte buffer Date: Tue, 28 May 2019 19:39:15 -0400 Message-ID: References: <20190525191039.14136.23307@vcs0.savannah.gnu.org> <20190525191040.CCD6C207F5@vcs0.savannah.gnu.org> <83v9xv2649.fsf@gnu.org> <83imtv1fbf.fsf@gnu.org> <7F0B61E6-C0CA-449B-B432-095569589168@gnu.org> <83y32qzk9b.fsf@gnu.org> <83pno2za3d.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="236314"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 29 01:40:12 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hVlhT-000zO4-5M for ged-emacs-devel@m.gmane.org; Wed, 29 May 2019 01:40:11 +0200 Original-Received: from localhost ([127.0.0.1]:44195 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVlhR-0003lG-S8 for ged-emacs-devel@m.gmane.org; Tue, 28 May 2019 19:40:09 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:58233) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVlgq-0003ky-3t for emacs-devel@gnu.org; Tue, 28 May 2019 19:39:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hVlgl-0007b9-4E for emacs-devel@gnu.org; Tue, 28 May 2019 19:39:29 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:11303) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hVlgf-0007S7-Nv; Tue, 28 May 2019 19:39:22 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id DFC46442D55; Tue, 28 May 2019 19:39:17 -0400 (EDT) Original-Received: from mail02.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id A212A442D42; Tue, 28 May 2019 19:39:16 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1559086756; bh=j1yO87RyAFA36c38ttFulZtHPXan7eFT8+mWCWOt3+I=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=e1FB/GElf5VwSqawLpUR7ELAWZCmrKA3hLQtFwbQMUoveIXtoMZLMhjRLZ32xF8x/ ExThmjgZts2bqv0ZtURWMgPeMMAriR2AMv5cz9BpBzpITpwps1YdiKSllhaGcVkn3v AhNtqBG7VDdOhi6f1CbUlVkpmLRyOjixL7otIXdNP9jXtd+nMDloA8TQb1pSToEunZ SrsNgKcwZHxyjfeeJrHvBp9SrVDQx+RHDUnwEIUq3yYjof5blJylRXESYEXOZrR4co YjKlu4cldH0Ze03H6ZxbwIp8HqaqRS8xRoOT93+UvCJDO5pw+WXmRWVw1cZDAyNqdU sDX/zIVn7yd3w== Original-Received: from ceviche (192-171-44-92.cpe.pppoe.ca [192.171.44.92]) by mail02.iro.umontreal.ca (Postfix) with ESMTPSA id 667E8120AB3; Tue, 28 May 2019 19:39:16 -0400 (EDT) In-Reply-To: <83pno2za3d.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 28 May 2019 21:51:18 +0300") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 132.204.25.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:237132 Archived-At: > If the input string is unibyte, then using string-to-unibyte will be > also odd. And if it's multibyte, the using encode-coding-string is > not really odd, is it? It's odd that the input string be multibyte since it's supposed to be encoded, yes. And it's also odd to call encode-coding-string on a string that we assume to be encoded (just because the string is multibyte doesn't make it less odd). In any case, I think we should strive to avoid using "encoded" multibyte strings. I can't remember ever having had a need for those, but when needed the way to turn a unibyte string into an equivalent multibyte string (without changing the fact that it's encoded) is string-to-multibyte. >> I agree that removing the call altogether is the better option. > > Right. In that case we need to document that the function expects as > input either a unibyte string or a pure-ASCII string. OK, I'll do that. Stefan