From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#6991: Please keep bytecode out of *Backtrace* buffers Date: Sat, 19 Nov 2016 20:34:50 +0200 Message-ID: <8360njb9o5.fsf@gnu.org> References: <8739tm9vzl.fsf@jidanni.org> <87vb5ct1lz.fsf@gnus.org> <2223f654-1e67-4a9a-a471-828fd4078410@default> <87fumokzbp.fsf@users.sourceforge.net> <83oa1bc3x2.fsf@gnu.org> <87d1hrlek2.fsf@users.sourceforge.net> <83eg27bjah.fsf@gnu.org> <87a8cvlcmk.fsf@users.sourceforge.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1479580648 3005 195.159.176.226 (19 Nov 2016 18:37:28 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 19 Nov 2016 18:37:28 +0000 (UTC) Cc: lekktu@gmail.com, johnw@gnu.org, monnier@iro.umontreal.ca, 6991@debbugs.gnu.org, larsi@gnus.org To: npostavs@users.sourceforge.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Nov 19 19:37:23 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c8AVq-0007Yj-IE for geb-bug-gnu-emacs@m.gmane.org; Sat, 19 Nov 2016 19:37:18 +0100 Original-Received: from localhost ([::1]:42403 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c8AVu-0001O6-2R for geb-bug-gnu-emacs@m.gmane.org; Sat, 19 Nov 2016 13:37:22 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37432) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c8AVe-0001La-Sb for bug-gnu-emacs@gnu.org; Sat, 19 Nov 2016 13:37:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c8AVa-0006pW-KB for bug-gnu-emacs@gnu.org; Sat, 19 Nov 2016 13:37:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48147) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c8AVa-0006pS-Gw for bug-gnu-emacs@gnu.org; Sat, 19 Nov 2016 13:37:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1c8AVa-0001in-5m for bug-gnu-emacs@gnu.org; Sat, 19 Nov 2016 13:37: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: Sat, 19 Nov 2016 18:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6991 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6991-submit@debbugs.gnu.org id=B6991.14795805686527 (code B ref 6991); Sat, 19 Nov 2016 18:37:02 +0000 Original-Received: (at 6991) by debbugs.gnu.org; 19 Nov 2016 18:36:08 +0000 Original-Received: from localhost ([127.0.0.1]:35312 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c8AUe-0001h7-Ls for submit@debbugs.gnu.org; Sat, 19 Nov 2016 13:36:08 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:46323) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c8AUa-0001gX-G6 for 6991@debbugs.gnu.org; Sat, 19 Nov 2016 13:36:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c8AUR-0006Ux-JR for 6991@debbugs.gnu.org; Sat, 19 Nov 2016 13:35:55 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:46489) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c8ATt-0006Iw-Gx; Sat, 19 Nov 2016 13:35:17 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4709 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1c8ATm-0005Yt-4b; Sat, 19 Nov 2016 13:35:16 -0500 In-reply-to: <87a8cvlcmk.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:125880 Archived-At: > From: npostavs@users.sourceforge.net > Cc: 6991@debbugs.gnu.org, lekktu@gmail.com, johnw@gnu.org, monnier@iro.umontreal.ca, larsi@gnus.org, drew.adams@oracle.com > Date: Sat, 19 Nov 2016 10:20:51 -0500 > > >> > Isn't the fact that copying text into the clipboard stops at the first > >> > null character a Windows-specific issue? And if it isn't Windows > >> > specific, isn't it at least specific to selections? > >> > >> It seems to be application specific. When I copy to a Firefox text area > >> on GNU/Linux I get a truncated result, but using xclip | od -c, I can > >> see the NUL byte and following characters are there. > > > > If this happens on both Windows and X, then both xselect.c and > > w32select.c should "encode" null bytes. Would that solve the problem? > > When printing a string literal, a null byte can be encoded as "\0", but > in general, when copying an arbitrary piece of text this encoding might > not necessarily be correct. Not sure what you have in mind. Can you show an example of when it's not correct? At least on MS-Windows, we only support text selections, so doing so in w32select.c should be TRT, because clipboard text cannot include null bytes on Windows, AFAIK. I also think it's TRT elsewhere, when the selection value is some kind of text. > > A literal string can be printed, and the result is generally the > > string itself. But with your suggestion, the null bytes will be > > lossily converted to something else. > > I don't think it's lossy. It's lossy because you can never know whether it came from a null byte or from a literal ASCII text "\0".