]> git.eshelyaron.com Git - emacs.git/commitdiff
(set-locale-environment): Set file-name coding system to utf-8 on Darwin.
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 3 Feb 2005 16:06:34 +0000 (16:06 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Thu, 3 Feb 2005 16:06:34 +0000 (16:06 +0000)
(set-default-coding-systems): Don't set default-file-name-coding-system
on Darwin systems.

lisp/ChangeLog
lisp/international/mule-cmds.el

index c7ab3fb44ae7737e586b9990bd98356d9902f143..708a20b1403f86604dee6232399fb49a0fb2b45b 100644 (file)
@@ -1,3 +1,10 @@
+2005-02-03  Stefan  <monnier@iro.umontreal.ca>
+
+       * international/mule-cmds.el (set-locale-environment): Set file-name
+       coding system to utf-8 on Darwin systems.
+       (set-default-coding-systems): Don't set default-file-name-coding-system
+       on Darwin systems.
+
 2005-02-03  Richard M. Stallman  <rms@gnu.org>
 
        * hi-lock.el (hi-lock-mode): Turning on Hi-Lock turns on Font-Lock.
index cf004fe5ebff5cb03751829ae84252506265ac5c..2b3af4d7e5072d4c88601e97c6ff46e36a2b1db3 100644 (file)
@@ -327,7 +327,8 @@ This also sets the following values:
        (or (local-variable-p 'buffer-file-coding-system buffer)
            (ucs-set-table-for-input buffer))))
 
-  (if default-enable-multibyte-characters
+  (if (and default-enable-multibyte-characters (not (eq system-type 'darwin)))
+      ;; The file-name coding system on Darwin systems is always utf-8.
       (setq default-file-name-coding-system coding-system))
   ;; If coding-system is nil, honor that on MS-DOS as well, so
   ;; that they could reset the terminal coding system.
@@ -1694,6 +1695,8 @@ The default status is as follows:
 
   (set-default-coding-systems nil)
   (setq default-sendmail-coding-system 'iso-latin-1)
+  ;; On Darwin systems, this should be utf-8, but when this file is loaded
+  ;; utf-8 is not yet defined, so we set it in set-locale-environment instead.
   (setq default-file-name-coding-system 'iso-latin-1)
   ;; Preserve eol-type from existing default-process-coding-systems.
   ;; On non-unix-like systems in particular, these may have been set
@@ -2428,6 +2431,10 @@ See also `locale-charset-language-names', `locale-language-names',
          (set-keyboard-coding-system code-page-coding)
          (set-terminal-coding-system code-page-coding))))
 
+    ;; On Darwin, file names are always encoded in utf-8, no matter the locale.
+    (when (eq system-type 'darwin)
+      (setq default-file-name-coding-system 'utf-8))
+
     ;; Default to A4 paper if we're not in a C, POSIX or US locale.
     ;; (See comments in Flocale_info.)
     (let ((locale locale)