Obey coding-system-for-write when writing stdout/stderr in batch
* src/print.c (printchar_to_stream): * src/xdisp.c (message_to_stderr): If coding-system-for-write has a non-nil value, use it to encode output in preference to locale-coding-system. See the discussions in http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00048.html for the details. * doc/lispref/os.texi (Terminal Output): Document how to send non-ASCII text via 'send-string-to-terminal'. (Batch Mode): Document how text written to standard streams is encoded. Fix inaccuracy regarding which output streams are used by output functions in batch mode.
Showing with 38 additions and 9 deletions