From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: npostavs@users.sourceforge.net Newsgroups: gmane.emacs.bugs Subject: bug#7279: 24.0.50; print-escape-multibyte not honored Date: Mon, 30 Jan 2017 02:12:58 -0500 Message-ID: <87poj5qav9.fsf@users.sourceforge.net> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1485760342 27815 195.159.176.226 (30 Jan 2017 07:12:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 30 Jan 2017 07:12:22 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Cc: 7279@debbugs.gnu.org, Andreas Schwab To: Helmut Eller Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jan 30 08:12:12 2017 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 1cY68I-0006ll-8n for geb-bug-gnu-emacs@m.gmane.org; Mon, 30 Jan 2017 08:12:10 +0100 Original-Received: from localhost ([::1]:58260 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cY68N-00073I-DV for geb-bug-gnu-emacs@m.gmane.org; Mon, 30 Jan 2017 02:12:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39809) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cY68E-00071x-1c for bug-gnu-emacs@gnu.org; Mon, 30 Jan 2017 02:12:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cY68A-0002VL-Sv for bug-gnu-emacs@gnu.org; Mon, 30 Jan 2017 02:12:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52484) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cY68A-0002Uw-Nu for bug-gnu-emacs@gnu.org; Mon, 30 Jan 2017 02:12:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cY68A-00030o-Fh for bug-gnu-emacs@gnu.org; Mon, 30 Jan 2017 02:12:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 30 Jan 2017 07:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7279 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 7279-submit@debbugs.gnu.org id=B7279.148576031911568 (code B ref 7279); Mon, 30 Jan 2017 07:12:02 +0000 Original-Received: (at 7279) by debbugs.gnu.org; 30 Jan 2017 07:11:59 +0000 Original-Received: from localhost ([127.0.0.1]:50683 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cY686-00030R-VS for submit@debbugs.gnu.org; Mon, 30 Jan 2017 02:11:59 -0500 Original-Received: from mail-it0-f50.google.com ([209.85.214.50]:36689) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cY685-00030A-FY; Mon, 30 Jan 2017 02:11:57 -0500 Original-Received: by mail-it0-f50.google.com with SMTP id c7so187804854itd.1; Sun, 29 Jan 2017 23:11:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=0saVat/GAruz9BSHqA9xtJyHe/m8v14OKIvRktBxBx8=; b=e2ohW+Wy8rNGqjBqEW/WkOlGwTyzneLoV9V598k8OXhYKNOt7KA5AClqoScV3JOuRa dRGu3IXYKrAoMMVnB+Ayi/FntvvZ423DYV7bNeqCjIDn0RZP7EzgckCGIK/0G68l3rn/ 9XtqKc21Oiy6HfZMbSvujE+I3anO2Bxc/Iti4lKyPxULNH/55GZ90Tqqz19mOATnyW3X MIY5nMNpS8Not5+aIuAYZVNKn6JXc9KqDCWnBQUe2vZSQPx/mZHXplfSN8YEYXQhXaBI G3sGEeRFmqjGYQy1HQSErMwbgMM5M5M1dxMrmC17akCy4w8SHyNrcS0Gc28n67aMiffL NXVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=0saVat/GAruz9BSHqA9xtJyHe/m8v14OKIvRktBxBx8=; b=KNC8nTinONBA+5smdJWCO7lDauomLfd/+5Ifrv2JyPD+vObf4+A7vfA/tn8i2qhc/u ANSCcDGwueZOWZpLenm54QtbS0EL4Od/X1xB0Ewg44/ClXM6e+2Uh4hcCMp29ucRGmiI u8oQQnHKyikogylPAWQzhqAMwm/JbIwOYX2Njga8RoEXxgTQN0WXWF6/ewpCXlSK6e0v IQ2AE7XMv1GXplFu6gaWbVNdUg+jryKmByR3wN64Utj41oCET10VDKHlqrHcbK+X3R3O XeQQ9/ZUJVIZLCKRdqILWLHqJ+6vb5B4wYGRoZtZDQTLPgQzQ9wz80oMWU2xV0neKVyC V4lA== X-Gm-Message-State: AIkVDXLfu1irhNErRY7+NA9ufk3txGSGD42on95L6A0E2XBMW8xscSPfvnLM8ugWdievTg== X-Received: by 10.36.88.20 with SMTP id f20mr14092290itb.9.1485760311989; Sun, 29 Jan 2017 23:11:51 -0800 (PST) Original-Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id 197sm5991456ita.14.2017.01.29.23.11.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 29 Jan 2017 23:11:51 -0800 (PST) In-Reply-To: (Helmut Eller's message of "Mon, 25 Oct 2010 21:04:38 +0200") 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:128781 Archived-At: tags 7279 notabug close 7279 quit Helmut Eller writes: > * Andreas Schwab [2010-10-25 18:02] writes: > >> Helmut Eller writes: >> >>> This code: >>> >>> (with-temp-file "/tmp/x.x" >>> (let ((print-escape-multibyte nil)) >>> (prin1 (string ?\x03bb) (current-buffer)))) >>> >>> writes "\x03bb" to the file, i.e. it seems to ignore the value >>> of print-escape-multibyte. >> >> I cannot reprodoce that. I also tried setting print-escape-multibyte to >> t and got the expected effect. Note that print-escape-multibyte is nil >> by default anyway. > > And this? > > (with-temp-file "/tmp/x.x" > (set-buffer-multibyte nil) > (let ((print-escape-multibyte nil)) > (prin1 (string ?\x80) (current-buffer)))) > You can't print a multibyte string into a unibyte buffer, this works: (with-temp-file "/tmp/x.x" (set-buffer-multibyte nil) (let ((print-escape-multibyte nil)) (prin1 (unibyte-string ?\x80) (current-buffer)))) or if you want to handle unicode you must choose an encoding: (with-temp-file "/tmp/x.x" (set-buffer-multibyte nil) (let ((print-escape-multibyte nil)) (prin1 (encode-coding-string (string ?\x03bb) 'utf-8) (current-buffer))))