From e834108f7df677ac323d554934fd6ea60560e289 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Sat, 6 May 2006 06:50:10 +0000 Subject: [PATCH] (mac-utxt-to-string): Don't make adjustment for MacJapanese if text is ASCII-only. --- lisp/term/mac-win.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el index 6495f30e2c7..8e810284b75 100644 --- a/lisp/term/mac-win.el +++ b/lisp/term/mac-win.el @@ -1265,8 +1265,10 @@ correspoinding TextEncodingBase value." ;; 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))))) -- 2.39.2