>> The problem I have now is: how can we detect when Emacs is running in
>> Terminal.app.  The TERM envvar is set to xterm-color, just like it is in
>> several X11 terminals (which don't use utf-8 by default).

> Use these envvars (the version number could be different):

> TERM_PROGRAM=Apple_Terminal
> TERM_PROGRAM_VERSION=100.1.4

Does the patch below help?


        Stefan


--- lisp/term/xterm.el  09 sep 2004 17:38:54 -0400      1.8
+++ lisp/term/xterm.el  23 mar 2005 13:50:40 -0500      
@@ -246,5 +246,10 @@
 ;; This recomputes all the default faces given the colors we've just set up.
 (tty-set-up-initial-frame-faces)
 
+;; Mac OS X's Terminal.app sets TERM to xterm and by default uses utf-8
+;; regardless of the locale.
+(when (equal (getenv "TERM_PROGRAM") "Apple_Terminal")
+  (set-terminal-coding-system 'utf-8))
+
 ;; arch-tag: 12e7ebdd-1e6c-4b25-b0f9-35ace25e855a
 ;;; xterm.el ends here


_______________________________________________
Emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug

Reply via email to