Browse Source

ox: Fix coding system error

* lisp/ox.el (org-export--generate-copy-script): Clone
  `buffer-file-coding-system' when creating a buffer copy.

This patches makes sure the output will share the same encoding as the
original buffer.
Nicolas Goaziou 12 years ago
parent
commit
65bacaac73
1 changed files with 7 additions and 4 deletions
  1. 7 4
      lisp/ox.el

+ 7 - 4
lisp/ox.el

@@ -2729,10 +2729,13 @@ another buffer, effectively cloning the original buffer there."
 			(val (cdr entry)))
 		    (and (not (eq var 'org-font-lock-keywords))
 			 (or (memq var
-				   '(major-mode default-directory
-						buffer-file-name outline-level
-						outline-regexp
-						buffer-invisibility-spec))
+				   '(major-mode
+				     default-directory
+				     buffer-file-name
+				     buffer-file-coding-system
+				     outline-level
+				     outline-regexp
+				     buffer-invisibility-spec))
 			     (string-match "^\\(org-\\|orgtbl-\\)"
 					   (symbol-name var)))
 			 ;; Skip unreadable values, as they cannot be