* lisp/progmodes/ebnf2ps.el (ebnf-print-buffer): Make non-ASCII
work slightly better (bug#39663).
number, prompt the user for the name of the file to save in."
(interactive (list (ps-print-preprint current-prefix-arg)))
(ebnf-log-header "(ebnf-print-buffer %S)" filename)
- (ebnf-print-region (point-min) (point-max) filename))
-
+ (cl-letf (((symbol-function 'ps-output-string)
+ ;; Make non-ASCII work (sort of).
+ (lambda (string)
+ (ps-output t (and string
+ (encode-coding-string
+ (decode-coding-string string 'utf-8)
+ 'iso-8859-1))))))
+ (ebnf-print-region (point-min) (point-max) filename)))
;;;###autoload
(defun ebnf-print-region (from to &optional filename)