diff --git a/plantuml-mode.el b/plantuml-mode.el index e40ba0d..d8d1b4b 100644 --- a/plantuml-mode.el +++ b/plantuml-mode.el @@ -491,6 +491,9 @@ to choose where to display it." (buf (get-buffer-create plantuml-preview-buffer)) (coding-system-for-read (and imagep 'binary)) (coding-system-for-write (and imagep 'binary))) + (when imagep + (with-current-buffer buf + (set-buffer-file-coding-system 'no-conversion))) (plantuml-exec-mode-preview-string prefix (plantuml-get-exec-mode) string buf))) (defun plantuml-preview-buffer (prefix)