From 6a2968b9e7b5ee604751d430879844b5298135e4 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 17 May 2019 06:00:22 +0200 Subject: [PATCH] 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. --- lisp/ps-print.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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))) -- 2.39.2