GNU bug report logs - #20545
New minor mode Electric Quote

Previous Next

Package: emacs;

Reported by: Paul Eggert <eggert <at> cs.ucla.edu>

Date: Sun, 10 May 2015 23:57:02 UTC

Severity: wishlist

Tags: patch

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #81 received at 20545 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 20545 <at> debbugs.gnu.org
Subject: Re: bug#20545: Transliterating curved to straight quotes in 8-bit
 environments
Date: Sun, 31 May 2015 20:06:16 -0700
[Message part 1 (text/plain, inline)]
Eli Zaretskii wrote:
> I guess we can always wait and see if we get complaints about this ;-)

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.
[0001-Treat-batch-stdout-stderr-like-standard-display.patch (text/x-patch, attachment)]

This bug report was last modified 9 years and 361 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.