bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#20545: Transliterating curved to straight quotes in 8-bit environmen


From: Paul Eggert
Subject: bug#20545: Transliterating curved to straight quotes in 8-bit environments
Date: Sun, 31 May 2015 20:06:16 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

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.

Attachment: 0001-Treat-batch-stdout-stderr-like-standard-display.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]