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#55727: 29.0.50; Incorrect zero symbol transcoding between applications Date: Mon, 30 May 2022 17:06:02 +0300 Message-ID: <83ee0bjet1.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1039"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 55727@debbugs.gnu.org To: =?UTF-8?Q?=D0=9F=D0=B5=D1=82=D1=80=D0=BE=D0=B2_?= =?UTF-8?Q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 30 16:22:54 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 1nvgHh-0009OY-E1 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 30 May 2022 16:22:17 +0200 Original-Received: from localhost ([::1]:53514 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvgHg-0003vp-Do for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 30 May 2022 10:22:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43886) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvgD6-0006C7-JH for bug-gnu-emacs@gnu.org; Mon, 30 May 2022 10:17:32 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51693) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvg2w-0004Ix-0w for bug-gnu-emacs@gnu.org; Mon, 30 May 2022 10:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nvg2v-000146-QK for bug-gnu-emacs@gnu.org; Mon, 30 May 2022 10:07:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 30 May 2022 14:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55727 X-GNU-PR-Package: emacs Original-Received: via spool by 55727-submit@debbugs.gnu.org id=B55727.16539195693996 (code B ref 55727); Mon, 30 May 2022 14:07:01 +0000 Original-Received: (at 55727) by debbugs.gnu.org; 30 May 2022 14:06:09 +0000 Original-Received: from localhost ([127.0.0.1]:45590 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nvg25-00012N-A4 for submit@debbugs.gnu.org; Mon, 30 May 2022 10:06:09 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:47938) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nvg23-000124-Lw for 55727@debbugs.gnu.org; Mon, 30 May 2022 10:06:08 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:38482) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvg1v-0004E1-Mw; Mon, 30 May 2022 10:05:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=gloWTwLLvTbSA+szBQO8E4VwsJs9Cjw7o8JudR/iDkY=; b=NOq8YCkh3/R8efsJzeiv IZARutMWewKYviOXQorU7g4zPuREEt0tNn/vA096udmjIIVxJBhbmDTNyTewzt664DYvLCHbWYXyu lRSRDCrWYEexbGk6nce2Pnin/0VxuiZ8jsXtCjCY8X7V54Rk2K1SLf9ypPyBH+x+OKa8zmYbEmoAX EvD3e1f0dn/ju5vuycKY4ScIX8FOjUOonTXPtWBeXI0JkxjiP0gitzqHAHDr9VjwE7twjqtNP94Qh 9vmTQ9MvTvuQ1B39wDp6PuuOn2Ogh+b3qZBGnSNqoFQilva6I9mRbxJHIkSL+UGENIPpgMc3kdisL YC+MKtqjbR/cQg==; Original-Received: from [87.69.77.57] (port=3027 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 1nvg1v-0007YB-2g; Mon, 30 May 2022 10:05:59 -0400 In-Reply-To: (an.petrov@pay-lab.ru) 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:233377 Archived-At: > From: Петров Андрей > Date: Mon, 30 May 2022 13:08:52 +0000 > > 1. Start two instances of emacs -Q. > 2. Switch to the "*scratch*" buffer of the first one and type the following: > M-: (insert (format "%S" "000\000000")) [RET] > You should see "000^@000" string. > 3. Copy the string into clipboard and paste into the other instance of > Emacs (which you have started before). > I get "000\0000" instead of "000\000000" > 4. Try evaluating inserted text ("000\0000") > C-c C-e > I get "000^@0" instead of "000^@000". > > It seems that "^@" is transcoded between applications into "\0" > instead of "\000". If I do the same test inside single instance > of Emacs I get the correct result. Yes. And it's a feature. From select.el: ;; Most programs are unable to handle NUL bytes in strings. (setq str (string-replace "\0" "\\0" str))