From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#53236: 26.1; encode-coding-string does not encode the string as expected Date: Fri, 14 Jan 2022 08:55:30 +0200 Message-ID: <838rvi3ixp.fsf@gnu.org> References: <8735lra07e.fsf@metalevel.at> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37132"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 53236@debbugs.gnu.org To: Markus Triska Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jan 14 08:25:51 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n8Gy6-0009QW-IA for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 14 Jan 2022 08:25:50 +0100 Original-Received: from localhost ([::1]:45664 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n8Gy5-0002MN-H3 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 14 Jan 2022 02:25:49 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:50858) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n8GVG-0007yC-Jk for bug-gnu-emacs@gnu.org; Fri, 14 Jan 2022 01:56:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42381) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n8GVG-0007dr-Ay for bug-gnu-emacs@gnu.org; Fri, 14 Jan 2022 01:56:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n8GVG-00085o-78 for bug-gnu-emacs@gnu.org; Fri, 14 Jan 2022 01:56:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Jan 2022 06:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53236 X-GNU-PR-Package: emacs Original-Received: via spool by 53236-submit@debbugs.gnu.org id=B53236.164214334931085 (code B ref 53236); Fri, 14 Jan 2022 06:56:02 +0000 Original-Received: (at 53236) by debbugs.gnu.org; 14 Jan 2022 06:55:49 +0000 Original-Received: from localhost ([127.0.0.1]:35284 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8GV3-00085J-Ck for submit@debbugs.gnu.org; Fri, 14 Jan 2022 01:55:49 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:49962) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8GV1-000854-Ul for 53236@debbugs.gnu.org; Fri, 14 Jan 2022 01:55:48 -0500 Original-Received: from [2001:470:142:3::e] (port=35300 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n8GUv-0007YC-R8; Fri, 14 Jan 2022 01:55:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=hg8aCLSFgBTIkliN/VBVAiiiIPh9jkY8v0YnmtAGuMg=; b=rRMUvSGhQ/sH M9B9KGHgrRBfzODtzc2hjEkdg/C8PDiHxp+mJ9m0UhSHib4A18HasJuTgEac0KjS5iNzua4PDBGiM U32BgsDloDUv7zeeWiYRgAs/DXdKyg2wmrjF9ikFsGIHS/DkgAZ6LwsvqtxhQ7hvjDNezs8EadhMB aqW82tgq61hQdA80zDWVk8XgLXo+olvHag1GW4KM5TlEEfqIWgoaSjJM1cADYYHDAh8yq3LSZ46J7 oLkgcvCuKTH2xnv4N4Ai7e4pSLYXhrK9UQWDGX0onibmgEeAGLrwofTVr7uJW1MU45/EcT8NIyNWS LXZ/hT9kRNVFv6yPl+odKQ==; Original-Received: from [87.69.77.57] (port=1574 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n8GUj-0002fU-RI; Fri, 14 Jan 2022 01:55:39 -0500 In-Reply-To: <8735lra07e.fsf@metalevel.at> (message from Markus Triska on Thu, 13 Jan 2022 20:45:57 +0100) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:224150 Archived-At: > From: Markus Triska > Date: Thu, 13 Jan 2022 20:45:57 +0100 > > Correspondingly, I expect (encode-coding-string "\200" 'utf-8) to yield > a string equivalent to "\xC2\x80", but that seems not to be the case. I get: > > (encode-coding-string "\200" 'utf-8) --> "\200" > > And therefore, unexpectedly: > > (string= (encode-coding-string "\200" 'utf-8) "\xC2\x80") --> nil "\200" is a unibyte string, and encoding unibyte strings returns those strings without changing them. This is not a bug, just a dark corner of encoding/decoding stuff.