diff options
| author | YAMAMOTO Mitsuharu | 2006-08-30 08:51:52 +0000 |
|---|---|---|
| committer | YAMAMOTO Mitsuharu | 2006-08-30 08:51:52 +0000 |
| commit | 762ce89d584fcb8597f6497b0078f4a84f19803e (patch) | |
| tree | 8708935ea857a0774565d19dfc62bd5630bf5c1d | |
| parent | 41d24b39c7a261c08e66a9397e128c639cace0bb (diff) | |
| download | emacs-762ce89d584fcb8597f6497b0078f4a84f19803e.tar.gz emacs-762ce89d584fcb8597f6497b0078f4a84f19803e.zip | |
(mac-string-to-utxt): If adjustment for MacJapanese
results in ASCII-only string, encode original one directly.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/term/mac-win.el | 21 |
2 files changed, 18 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b628594097d..d8ec23f04e5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2006-08-30 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 2 | |||
| 3 | * term/mac-win.el (mac-string-to-utxt): If adjustment for MacJapanese | ||
| 4 | results in ASCII-only string, encode original one directly. | ||
| 5 | |||
| 1 | 2006-08-29 Romain Francoise <romain@orebokech.com> | 6 | 2006-08-29 Romain Francoise <romain@orebokech.com> |
| 2 | 7 | ||
| 3 | * startup.el (normal-splash-screen, fancy-splash-screens): Make | 8 | * startup.el (normal-splash-screen, fancy-splash-screens): Make |
diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el index 538aa09b2c5..20a65976a5c 100644 --- a/lisp/term/mac-win.el +++ b/lisp/term/mac-win.el | |||
| @@ -1287,14 +1287,19 @@ correspoinding TextEncodingBase value." | |||
| 1287 | (find-coding-systems-string string))) | 1287 | (find-coding-systems-string string))) |
| 1288 | (setq coding-system | 1288 | (setq coding-system |
| 1289 | (coding-system-change-eol-conversion coding-system 'mac)) | 1289 | (coding-system-change-eol-conversion coding-system 'mac)) |
| 1290 | (when (and (eq system-type 'darwin) | 1290 | (let ((str string)) |
| 1291 | (eq coding-system 'japanese-shift-jis-mac)) | 1291 | (when (and (eq system-type 'darwin) |
| 1292 | (setq encoding mac-text-encoding-mac-japanese-basic-variant) | 1292 | (eq coding-system 'japanese-shift-jis-mac)) |
| 1293 | (setq string (subst-char-in-string ?\\ ?\x80 string)) | 1293 | (setq encoding mac-text-encoding-mac-japanese-basic-variant) |
| 1294 | (subst-char-in-string ?\¥ ?\x5c string t)) | 1294 | (setq str (subst-char-in-string ?\\ ?\x80 str)) |
| 1295 | (setq data (mac-code-convert-string | 1295 | (subst-char-in-string ?\¥ ?\x5c str t) |
| 1296 | (encode-coding-string string coding-system) | 1296 | ;; ASCII-only? |
| 1297 | (or encoding coding-system) nil))) | 1297 | (if (string-match "\\`[\x00-\x7f]*\\'" str) |
| 1298 | (setq str nil))) | ||
| 1299 | (and str | ||
| 1300 | (setq data (mac-code-convert-string | ||
| 1301 | (encode-coding-string str coding-system) | ||
| 1302 | (or encoding coding-system) nil))))) | ||
| 1298 | (or data (encode-coding-string string (if (eq (byteorder) ?B) | 1303 | (or data (encode-coding-string string (if (eq (byteorder) ?B) |
| 1299 | 'utf-16be-mac | 1304 | 'utf-16be-mac |
| 1300 | 'utf-16le-mac))))) | 1305 | 'utf-16le-mac))))) |