From: Lars Ingebrigtsen Date: Fri, 17 May 2019 04:00:22 +0000 (+0200) Subject: Avoind string-as-multibyte in ps-output-string-prim X-Git-Tag: emacs-27.0.90~2857 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6a2968b9e7b5ee604751d430879844b5298135e4;p=emacs.git Avoind string-as-multibyte in ps-output-string-prim * lisp/ps-print.el (ps-output-string-prim): Avoid `string-as-multibyte', and encode as utf-8 instead if multibyte. --- diff --git a/lisp/ps-print.el b/lisp/ps-print.el index 647597cefae..881d6a8f4bc 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el @@ -4612,7 +4612,9 @@ page-height == ((floor print-height ((th + ls) * zh)) * ((th + ls) * zh)) - th (defsubst ps-output-string-prim (string) (insert "(") ;insert start-string delimiter (save-excursion ;insert string - (insert (string-as-unibyte string))) + (insert (if (multibyte-string-p string) + (encode-coding-string string 'utf-8) + string))) ;; Find and quote special characters as necessary for PS ;; This skips everything except control chars, non-ASCII chars, (, ) and \. (while (progn (skip-chars-forward " -'*-[]-~") (not (eobp)))