From: Eli Zaretskii <eliz@gnu.org>
To: "Петров Андрей" <an.petrov@pay-lab.ru>
Cc: 55727@debbugs.gnu.org
Subject: bug#55727: 29.0.50; Incorrect zero symbol transcoding between applications
Date: Mon, 30 May 2022 17:06:02 +0300 [thread overview]
Message-ID: <83ee0bjet1.fsf@gnu.org> (raw)
In-Reply-To: <ff0de15159cb43f5a5d68578ca66ae59@pay-lab.ru> (an.petrov@pay-lab.ru)
> From: Петров Андрей <an.petrov@pay-lab.ru>
> 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))
prev parent reply other threads:[~2022-05-30 14:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-30 13:08 bug#55727: 29.0.50; Incorrect zero symbol transcoding between applications Петров Андрей
2022-05-30 13:42 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-30 14:27 ` Петров Андрей
2022-05-30 15:42 ` Eli Zaretskii
2022-05-30 16:23 ` Петров Андрей
2022-05-30 18:09 ` Eli Zaretskii
2022-05-31 0:16 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-30 14:06 ` Eli Zaretskii [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83ee0bjet1.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=55727@debbugs.gnu.org \
--cc=an.petrov@pay-lab.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.