changeset 56800:752ef76fcc08

(utf-8-post-read-conversion): If the buffer is unibyte, temporarily set it multibyte.
author Kenichi Handa <handa@m17n.org>
date Fri, 27 Aug 2004 00:24:50 +0000
parents d2348e1fa995
children e423df082f94
files lisp/international/utf-8.el
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/utf-8.el	Thu Aug 26 18:43:29 2004 +0000
+++ b/lisp/international/utf-8.el	Fri Aug 27 00:24:50 2004 +0000
@@ -870,7 +870,9 @@
       ;; version of the string in the loop, since it's always loaded as
       ;; unibyte from a byte-compiled file.
       (let ((range (string-as-multibyte "^\xc0-\xc3\xe1-\xf7"))
+	    (buffer-multibyte enable-multibyte-characters)
 	    hash-table ch)
+	(set-buffer-multibyte t)
 	(when utf-translate-cjk-mode
 	  (if (not utf-translate-cjk-lang-env)
 	      ;; Check these characters:
@@ -893,7 +895,9 @@
 		(progn
 		  (insert ch)
 		  (delete-char 1))
-	      (forward-char 1)))))
+	      (forward-char 1))))
+	(or buffer-multibyte
+	    (set-buffer-multibyte nil)))
 
       (when (and utf-8-compose-scripts (> length 1))
 	;; These currently have definitions which cover the relevant