From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#20545: Transliterating curved to straight quotes in 8-bit environments Date: Mon, 01 Jun 2015 17:31:42 +0300 Message-ID: <83eglvts8h.fsf@gnu.org> References: <554FEFFE.7000303@cs.ucla.edu> <83k2wfma51.fsf@gnu.org> <555301BD.1040503@cs.ucla.edu> <83r3qkjuve.fsf@gnu.org> <5553822C.3000709@cs.ucla.edu> <83iobwjt3s.fsf@gnu.org> <55544199.3040704@cs.ucla.edu> <5557B4A7.9070604@cs.ucla.edu> <83k2w7ff3v.fsf@gnu.org> <5558C8CC.9030408@cs.ucla.edu> <83egmff2kh.fsf@gnu.org> <556BCC28.3030705@cs.ucla.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Trace: ger.gmane.org 1433169204 13863 80.91.229.3 (1 Jun 2015 14:33:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Jun 2015 14:33:24 +0000 (UTC) Cc: 20545@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 01 16:33:13 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YzQm6-0000JJ-Su for geb-bug-gnu-emacs@m.gmane.org; Mon, 01 Jun 2015 16:33:11 +0200 Original-Received: from localhost ([::1]:52761 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzQm5-0002eK-Qu for geb-bug-gnu-emacs@m.gmane.org; Mon, 01 Jun 2015 10:33:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39371) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzQm2-0002eE-1Q for bug-gnu-emacs@gnu.org; Mon, 01 Jun 2015 10:33:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YzQly-0000Cl-Ok for bug-gnu-emacs@gnu.org; Mon, 01 Jun 2015 10:33:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54509) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzQly-0000Cf-MM for bug-gnu-emacs@gnu.org; Mon, 01 Jun 2015 10:33:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YzQly-00012N-FF for bug-gnu-emacs@gnu.org; Mon, 01 Jun 2015 10:33:02 -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, 01 Jun 2015 14:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20545 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 20545-submit@debbugs.gnu.org id=B20545.14331691273928 (code B ref 20545); Mon, 01 Jun 2015 14:33:02 +0000 Original-Received: (at 20545) by debbugs.gnu.org; 1 Jun 2015 14:32:07 +0000 Original-Received: from localhost ([127.0.0.1]:36251 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YzQl4-00011F-G9 for submit@debbugs.gnu.org; Mon, 01 Jun 2015 10:32:07 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:54510) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YzQl0-00010e-I6 for 20545@debbugs.gnu.org; Mon, 01 Jun 2015 10:32:03 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0NP900G00SA9KK00@a-mtaout21.012.net.il> for 20545@debbugs.gnu.org; Mon, 01 Jun 2015 17:31:55 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NP900G9XSD7JK20@a-mtaout21.012.net.il>; Mon, 01 Jun 2015 17:31:55 +0300 (IDT) In-reply-to: <556BCC28.3030705@cs.ucla.edu> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:103430 Archived-At: > Date: Sun, 31 May 2015 20:06:16 -0700 > From: Paul Eggert > CC: 20545@debbugs.gnu.org > > In trying out a few new things I did run into a problem in batch mode, because > (print FOO) can generate improperly encoded output if FOO contains characters > outside the system locale. For example, if the file t.el uses UTF-8 encoding > and contains this: > > ;; -*- coding: utf-8 -*- > (print "‘x’ “y” `z'") > > and Emacs is in an 8-bit locale, the command 'emacs --batch -l t.el' will output > the string "‘x’ “y” `z'" to stdout in a UTF-8 encoding, which is an encoding > error for this environment. > > Although this problem can occur with any non-ASCII character, diagnostics > containing curved quotes will make it more likely. I installed the attached > patch to fix this, using the same technique for standard output that Emacs is > already using for standard display. It sounds strange to use display tables for batch-mode output, but maybe it's just a matter of getting used to.