changeset 70429:0970641ee615

(mac-utxt-to-string): Don't make adjustment for MacJapanese if text is ASCII-only.
author YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
date Sat, 06 May 2006 06:50:10 +0000
parents 1a065139c7c3
children a4ddaa03010e
files lisp/term/mac-win.el
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/term/mac-win.el	Sat May 06 00:34:11 2006 +0000
+++ b/lisp/term/mac-win.el	Sat May 06 06:50:10 2006 +0000
@@ -1265,8 +1265,10 @@
 	  ;; reverse solidus?
 	  (if (string-match "[\xa0\xfd-\xff]" str)
 	      (setq str nil)
-	    (subst-char-in-string ?\x5c ?\¥ str t)
-	    (subst-char-in-string ?\x80 ?\\ str t))))
+	    ;; ASCII-only?
+	    (unless (string-match "\\`[[:ascii:]]*\\'" str)
+	      (subst-char-in-string ?\x5c ?\¥ str t)
+	      (subst-char-in-string ?\x80 ?\\ str t)))))
     (or str
 	(decode-coding-string data
 			      (if (eq (byteorder) ?B) 'utf-16be 'utf-16le)))))