From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?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?= Newsgroups: gmane.emacs.bugs Subject: bug#55727: 29.0.50; Incorrect zero symbol transcoding between applications Date: Mon, 30 May 2022 14:27:43 +0000 Message-ID: <44c9de3ce35141679ab3c158ae2cfe0e@pay-lab.ru> References: , <878rqjb0h0.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36843"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "55727@debbugs.gnu.org" <55727@debbugs.gnu.org> To: Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 30 16:29:04 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 1nvgOF-0009Mt-D8 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 30 May 2022 16:29:03 +0200 Original-Received: from localhost ([::1]:39054 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvgOE-0004mf-3y for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 30 May 2022 10:29:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46154) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvgNG-0003FN-46 for bug-gnu-emacs@gnu.org; Mon, 30 May 2022 10:28:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51789) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvgNF-00087M-R3 for bug-gnu-emacs@gnu.org; Mon, 30 May 2022 10:28:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nvgNF-0001vq-Nh for bug-gnu-emacs@gnu.org; Mon, 30 May 2022 10:28:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?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-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 30 May 2022 14:28: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.16539208737404 (code B ref 55727); Mon, 30 May 2022 14:28:01 +0000 Original-Received: (at 55727) by debbugs.gnu.org; 30 May 2022 14:27:53 +0000 Original-Received: from localhost ([127.0.0.1]:45686 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nvgN7-0001vM-6N for submit@debbugs.gnu.org; Mon, 30 May 2022 10:27:53 -0400 Original-Received: from mail2.itgrp.ru ([87.251.91.230]:25376) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nvgN5-0001uz-0G for 55727@debbugs.gnu.org; Mon, 30 May 2022 10:27:52 -0400 IronPort-SDR: 9SerVTHMW+LQK+HovhoHU5B5yH8VuJ8iEgj5FqAJBdfGq2myRp1g1ZtvsJ8ykxrC3n2bSWg07m 8fGCyoE9FmOg== X-IronPort-AV: E=Sophos;i="5.90,182,1643662800"; d="scan'208";a="156260043" Thread-Topic: bug#55727: 29.0.50; Incorrect zero symbol transcoding between applications Thread-Index: AQHYdCY5eNIAMgZ12EaveCQ5PKu/BK03bhcOgAALWcA= In-Reply-To: <878rqjb0h0.fsf@yahoo.com> Accept-Language: ru-RU, en-US Content-Language: ru-RU x-originating-ip: [10.24.4.20] 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:233378 Archived-At: Hi, Po. OK, You can close the bug then. Just tell me if Emacs have ready to use solution for passing binary strings between applications in a form what can be correctly restored with `read' function. I found that output of `print' also can not be transferred through application boundary. =F3 =D5=D7=C1=D6=C5=CE=C9=C5=CD, =E1=CE=C4=D2=C5=CA =F0=C5=D4=D2=CF=D7, =D0=D2=CF=C7=D2=C1=CD=CD=C9=D3=D4 =EF=EF=EF =E9=CE=D0=C1=D3-=F3=CF=C6=D4. ________________________________________ =EF=D4: Po Lu =EF=D4=D0=D2=C1=D7=CC=C5=CE=CF: 30 =CD=C1=D1 2022 =C7. 18:42:51 =EB=CF=CD=D5: =F0=C5=D4=D2=CF=D7 =E1=CE=C4=D2=C5=CA =EB=CF=D0=C9=D1: 55727@debbugs.gnu.org =F4=C5=CD=C1: Re: bug#55727: 29.0.50; Incorrect zero symbol transcoding bet= ween applications =F0=C5=D4=D2=CF=D7 =E1=CE=C4=D2=C5=CA writes: > Hello, team! > > Please check the following behavior: > > 1. Start two instances of emacs -Q. > 2. Switch to the "*scratch*" buffer of the first one and type the followi= ng: > 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. That's not a bug. Most programs cannot tolerate NUL bytes inside selection strings, so the Emacs selection converter deliberately replaces those inside a string with "\0" before sending the string to a requestor. When one Emacs instance owns the selection, the contents of the kill ring are used directly when yanking text, so that conversion doesn't take place.