From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.bugs Subject: bug#15803: default-file-name-coding-system: utf-8 better than latin-1 these days? Date: Mon, 04 Dec 2017 19:35:05 -0500 Message-ID: References: <708ten8bam.fsf@fencepost.gnu.org> <83shcu3mtf.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1512434170 19926 195.159.176.226 (5 Dec 2017 00:36:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 5 Dec 2017 00:36:10 +0000 (UTC) User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) Cc: 15803@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Dec 05 01:36:05 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eM1DQ-0004u2-5D for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 Dec 2017 01:36:04 +0100 Original-Received: from localhost ([::1]:45811 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eM1DX-000531-Gl for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Dec 2017 19:36:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38162) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eM1DP-00052w-68 for bug-gnu-emacs@gnu.org; Mon, 04 Dec 2017 19:36:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eM1DO-0001nx-1I for bug-gnu-emacs@gnu.org; Mon, 04 Dec 2017 19:36:03 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37455) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eM1DN-0001nr-Sh for bug-gnu-emacs@gnu.org; Mon, 04 Dec 2017 19:36:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eM1DN-0005Wb-Jc for bug-gnu-emacs@gnu.org; Mon, 04 Dec 2017 19:36:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Glenn Morris Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 Dec 2017 00:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15803 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 15803-submit@debbugs.gnu.org id=B15803.151243411421184 (code B ref 15803); Tue, 05 Dec 2017 00:36:01 +0000 Original-Received: (at 15803) by debbugs.gnu.org; 5 Dec 2017 00:35:14 +0000 Original-Received: from localhost ([127.0.0.1]:46136 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eM1Cb-0005Vc-MY for submit@debbugs.gnu.org; Mon, 04 Dec 2017 19:35:13 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:46927) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eM1Ca-0005VR-UI for 15803@debbugs.gnu.org; Mon, 04 Dec 2017 19:35:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eM1CU-0001BS-KX for 15803@debbugs.gnu.org; Mon, 04 Dec 2017 19:35:07 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37829) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eM1CU-0001BA-HK for 15803@debbugs.gnu.org; Mon, 04 Dec 2017 19:35:06 -0500 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1eM1CT-0005oB-RK; Mon, 04 Dec 2017 19:35:05 -0500 X-Spook: Airplane COSCO beanpole CISU pink noise Area 51 Temblor X-Ran: 4$f5EWbdO1"cF$uJWjV^L"EuDY?~>LdCzV<2G,B`>OuElnB\Lf!Q]zZm-)e2s{w\-AJ0}C X-Hue: green X-Attribution: GM In-Reply-To: <83shcu3mtf.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 01 Dec 2017 09:54:36 +0200") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:140705 Archived-At: Eli Zaretskii wrote: > Perhaps on Posix systems, but not elsewhere. I assume non-POSIX is newspeak for MS-Windows (native and DOS). > And if we make the change, we should make sure building Emacs in a > non-ASCII directory still works. It works fine for me on G/L to have source, build, and install directories be distinct non-ASCII directories. (Emacs works, that is, but makeinfo 5.1 fails to find @include files in non-ASCII directories, so I wonder how common such setups are.) BTW, it feels very dated to me to have discussion of Windows 9X in the Emacs manual section on file-name-coding. diff --git i/doc/emacs/mule.texi w/doc/emacs/mule.texi index 78f77cb..5fc44a6 100644 --- i/doc/emacs/mule.texi +++ w/doc/emacs/mule.texi @@ -1214,11 +1214,8 @@ system can encode. If @code{file-name-coding-system} is @code{nil}, Emacs uses a default coding system determined by the selected language environment, -and stored in the @code{default-file-name-coding-system} variable. -@c FIXME? Is this correct? What is the "default language environment"? -In the default language environment, non-@acronym{ASCII} characters in -file names are not encoded specially; they appear in the file system -using the internal Emacs representation. +and stored in the @code{default-file-name-coding-system} variable +(normally UTF-8). @cindex file-name encoding, MS-Windows @vindex w32-unicode-filenames diff --git i/lisp/international/mule-cmds.el w/lisp/international/mule-cmds.el index 9d22d6e..192f0e9 100644 --- i/lisp/international/mule-cmds.el +++ w/lisp/international/mule-cmds.el @@ -1797,10 +1797,11 @@ The default status is as follows: 'raw-text) (set-default-coding-systems nil) - (setq default-sendmail-coding-system 'iso-latin-1) - ;; On Darwin systems, this should be utf-8-unix, but when this file is loaded - ;; that is not yet defined, so we set it in set-locale-environment instead. - (setq default-file-name-coding-system 'iso-latin-1-unix) + (setq default-sendmail-coding-system 'utf-8) + (setq default-file-name-coding-system (if (memq system-type + '(window-nt ms-dos)) + 'iso-latin-1-unix + 'utf-8-unix)) ;; Preserve eol-type from existing default-process-coding-systems. ;; On non-unix-like systems in particular, these may have been set ;; carefully by the user, or by the startup code, to deal with the @@ -1816,8 +1817,10 @@ The default status is as follows: (input-coding (condition-case nil (coding-system-change-text-conversion - (cdr default-process-coding-system) 'iso-latin-1) - (coding-system-error 'iso-latin-1)))) + (cdr default-process-coding-system) + (if (memq system-type '(window-nt ms-dos)) 'iso-latin-1 'utf-8)) + (coding-system-error + (if (memq system-type '(window-nt ms-dos)) 'iso-latin-1 'utf-8))))) (setq default-process-coding-system (cons output-coding input-coding))) diff --git i/lisp/mail/sendmail.el w/lisp/mail/sendmail.el index cd80211..36fbb7d 100644 --- i/lisp/mail/sendmail.el +++ w/lisp/mail/sendmail.el @@ -993,7 +993,7 @@ but lower priority than the local value of `buffer-file-coding-system'. See also the function `select-message-coding-system'.") ;;;###autoload -(defvar default-sendmail-coding-system 'iso-latin-1 +(defvar default-sendmail-coding-system 'utf-8 "Default coding system for encoding the outgoing mail. This variable is used only when `sendmail-coding-system' is nil. diff --git i/lisp/mh-e/mh-comp.el w/lisp/mh-e/mh-comp.el index 98067ce..25118cd 100644 --- i/lisp/mh-e/mh-comp.el +++ w/lisp/mh-e/mh-comp.el @@ -304,6 +304,7 @@ message and scan line." (let ((draft-buffer (current-buffer)) (file-name buffer-file-name) (config mh-previous-window-config) + ;; FIXME this is subtly different to select-message-coding-system. (coding-system-for-write (if (and (local-variable-p 'buffer-file-coding-system (current-buffer)) ;XEmacs needs two args @@ -315,7 +316,7 @@ message and scan line." (or (and (boundp 'sendmail-coding-system) sendmail-coding-system) (and (default-boundp 'buffer-file-coding-system) (default-value 'buffer-file-coding-system)) - 'iso-latin-1)))) + 'utf-8)))) ;; Older versions of spost do not support -msgid and -mime. (unless mh-send-uses-spost-flag ;; Adding a Message-ID field looks good, makes it easier to search for