]> git.eshelyaron.com Git - emacs.git/commitdiff
(mac-utxt-to-string): Don't make adjustment for
authorYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Sat, 6 May 2006 06:50:10 +0000 (06:50 +0000)
committerYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Sat, 6 May 2006 06:50:10 +0000 (06:50 +0000)
MacJapanese if text is ASCII-only.

lisp/term/mac-win.el

index 6495f30e2c7ee7e4674f3a5067925db8e573dc45..8e810284b75f221861f7ebd6f5e8339f61be0d90 100644 (file)
@@ -1265,8 +1265,10 @@ correspoinding TextEncodingBase value."
          ;; reverse solidus?
          (if (string-match "[\xa0\xfd-\xff]" str)
              (setq str nil)
-           (subst-char-in-string ?\x5c ?\\e(J\\e(B str t)
-           (subst-char-in-string ?\x80 ?\\ str t))))
+           ;; ASCII-only?
+           (unless (string-match "\\`[[:ascii:]]*\\'" str)
+             (subst-char-in-string ?\x5c ?\\e(J\\e(B str t)
+             (subst-char-in-string ?\x80 ?\\ str t)))))
     (or str
        (decode-coding-string data
                              (if (eq (byteorder) ?B) 'utf-16be 'utf-16le)))))