• Paul Eggert's avatar
    Treat batch stdout/stderr like standard display · 467af178
    Paul Eggert authored
    Calls like (print FOO) could generate improperly encoded or
    hard-to-read output if FOO contains characters outside the system
    locale.  Fix this by treating batch stdout and stderr like
    interactive standard display, when it comes to transliterating and
    encoding characters (Bug#20545).
    * doc/emacs/mule.texi (Communication Coding):
    * doc/lispref/display.texi (Active Display Table):
    * doc/lispref/nonascii.texi (Locales):
    * etc/NEWS:
    * src/coding.c (syms_of_coding):
    * src/dispnew.c (syms_of_display):
    Document this.
    * src/print.c: Include disptab.h.
    (printchar_to_stream): New function, with much of the guts of the
    old Fexternal_debugging_output, except this one also uses the
    standard display table.
    (printchar, strout, Fexternal_debugging_output): Use it.
print.c 68.4 KB