diff options
| author | Ćukasz Stelmach | 2016-02-23 14:54:30 +1100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2016-02-23 14:54:30 +1100 |
| commit | 3cedbdcc71ebefc12bd20ec84f74251fe99ee7d0 (patch) | |
| tree | 9d05c0eed05b9937525cbf7132fe7f368e35b7eb | |
| parent | dea946d1bc9ae14d9d9e5c409c9e0d1492ed4f10 (diff) | |
| download | emacs-3cedbdcc71ebefc12bd20ec84f74251fe99ee7d0.tar.gz emacs-3cedbdcc71ebefc12bd20ec84f74251fe99ee7d0.zip | |
Encode header strings before printing
* lisp/ps-print.el (ps-generate-header-line): Encode the
header strings to avoid problems with non-ASCII headers
(bug#22611).
| -rw-r--r-- | lisp/ps-print.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/ps-print.el b/lisp/ps-print.el index 7333709c19c..2ea0919c686 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el | |||
| @@ -4761,7 +4761,11 @@ page-height == ((floor print-height ((th + ls) * zh)) * ((th + ls) * zh)) - th | |||
| 4761 | ;; Literal strings should be output as is -- the string must contain its own | 4761 | ;; Literal strings should be output as is -- the string must contain its own |
| 4762 | ;; PS string delimiters, '(' and ')', if necessary. | 4762 | ;; PS string delimiters, '(' and ')', if necessary. |
| 4763 | ((stringp content) | 4763 | ((stringp content) |
| 4764 | (ps-output content)) | 4764 | (if (functionp ps-encode-header-string-function) |
| 4765 | (dolist (elem (funcall ps-encode-header-string-function | ||
| 4766 | content fonttag)) | ||
| 4767 | (ps-output elem)) | ||
| 4768 | (ps-output content))) | ||
| 4765 | 4769 | ||
| 4766 | ;; Functions are called -- they should return strings; they will be inserted | 4770 | ;; Functions are called -- they should return strings; they will be inserted |
| 4767 | ;; as strings and the PS string delimiters added. | 4771 | ;; as strings and the PS string delimiters added. |
| @@ -4777,7 +4781,7 @@ page-height == ((floor print-height ((th + ls) * zh)) * ((th + ls) * zh)) - th | |||
| 4777 | ((and (symbolp content) (boundp content)) | 4781 | ((and (symbolp content) (boundp content)) |
| 4778 | (if (fboundp ps-encode-header-string-function) | 4782 | (if (fboundp ps-encode-header-string-function) |
| 4779 | (dolist (l (funcall ps-encode-header-string-function | 4783 | (dolist (l (funcall ps-encode-header-string-function |
| 4780 | (symbol-value content) fonttag)) | 4784 | (symbol-value content) fonttag)) |
| 4781 | (ps-output-string l)) | 4785 | (ps-output-string l)) |
| 4782 | (ps-output-string (symbol-value content)))) | 4786 | (ps-output-string (symbol-value content)))) |
| 4783 | 4787 | ||