From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#24162: 25.0.50; utf8 filenames with ornamented characters in MS-Windows Date: Sat, 06 Aug 2016 14:53:27 +0300 Message-ID: <83mvkqjeq0.fsf@gnu.org> References: <831t22kyk4.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1470484471 14146 195.159.176.226 (6 Aug 2016 11:54:31 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 6 Aug 2016 11:54:31 +0000 (UTC) Cc: 24162@debbugs.gnu.org To: "cschr" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Aug 06 13:54:27 2016 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 1bW0BC-0001ko-Ng for geb-bug-gnu-emacs@m.gmane.org; Sat, 06 Aug 2016 13:54:14 +0200 Original-Received: from localhost ([::1]:48929 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bW0B9-0001Wu-Hu for geb-bug-gnu-emacs@m.gmane.org; Sat, 06 Aug 2016 07:54:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54875) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bW0B3-0001Wo-AW for bug-gnu-emacs@gnu.org; Sat, 06 Aug 2016 07:54:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bW0B0-0000SO-3o for bug-gnu-emacs@gnu.org; Sat, 06 Aug 2016 07:54:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59873) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bW0B0-0000S8-0K for bug-gnu-emacs@gnu.org; Sat, 06 Aug 2016 07:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bW0Az-0004Ui-Pi for bug-gnu-emacs@gnu.org; Sat, 06 Aug 2016 07:54:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Aug 2016 11:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24162 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24162-submit@debbugs.gnu.org id=B24162.147048442417252 (code B ref 24162); Sat, 06 Aug 2016 11:54:01 +0000 Original-Received: (at 24162) by debbugs.gnu.org; 6 Aug 2016 11:53:44 +0000 Original-Received: from localhost ([127.0.0.1]:57170 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bW0Ai-0004UC-7M for submit@debbugs.gnu.org; Sat, 06 Aug 2016 07:53:44 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35613) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bW0Ag-0004U0-VZ for 24162@debbugs.gnu.org; Sat, 06 Aug 2016 07:53:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bW0AY-0000Nw-Fb for 24162@debbugs.gnu.org; Sat, 06 Aug 2016 07:53:37 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33517) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bW0AY-0000N7-CH; Sat, 06 Aug 2016 07:53:34 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2139 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bW0AW-0007IT-K5; Sat, 06 Aug 2016 07:53:33 -0400 In-reply-to: (cschr@freenet.de) 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:121890 Archived-At: [Please keep the bug address on the CC list.] > From: "cschr" > Date: Sat, 6 Aug 2016 13:30:18 +0200 > > Honestly I am not an emacs expert yet - it could well be that my language > configuration is not as it should be. Maybe you could give me a hint how > to set it, or direct me to the right web page ? You shouldn't need to do anything, the defaults should "just work" for you. They do work for me. However, using MSYS2 or Cygwin builds of various utilities might be a problem, and could very well cause incompatibilities. The only way around that is to use native ports of those utilities. > Im indeed using the MSYS2 build of the GNU touch utility. That doesn't tell enough about the nature of the binary. What does the following command display inside Emacs? M-: (w32-application-type (executable-find "touch")) RET > But the strange thing is: I also downloaded and used emacs via MSYS2 > - and it had the same problem ! Emacs downloaded from MSYS2 is a native Windows program. I'm not so sure about touch.exe; the above command should tell. > I had had an earlier issue with ornamented characters which was even worse: > dired sometimes displayed files with ornamented characters incorrectly and > was unable to open them (but this did not happen always - I never found out > when it did and when not!). Could it be that the files that cannot be displayed were created by some external utilities? Or by old versions of Emacs? What does the Windows Explorer show when you try to display the folders with those file names? > I had resolved this one successfully by putting > the following into my init.el - since then the issue never occurred again: > (prefer-coding-system 'utf-8) > (set-default-coding-systems 'utf-8) > (set-terminal-coding-system 'utf-8) > (set-keyboard-coding-system 'utf-8) > ;; backwards compatibility as default-buffer-file-coding-system > ;; is deprecated in 23.2. > (if (boundp 'buffer-file-coding-system) > (setq-default buffer-file-coding-system 'utf-8) > (setq default-buffer-file-coding-system 'utf-8)) > ;; Treat clipboard input as UTF-8 string first; compound text next, etc. > (setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING)) These are all wrong, you should remove them from your init file. The correct defaults for the various coding-systems are set up on Windows automatically, and you shouldn't try changing them, as long as you are using the native Windows build of Emacs. > what I now just tried instead is: > 1. I took out all "...-coding-system" statements from my init.el and > restarted emacs > 2. I started dired and looked at the folder "täst.txt" - result: now the > ornamented character is displayed uncorrectly and the file cannot be opened > anymore Can you display that folder in the Windows Explorer? If so, does it show correct file names? If the file names are corrupted in the Explorer, you have somehow created that folder with file names in the wrong encoding. > 3. I executed again > C:\Programme\Emacs-24.5-Win64\bin\emacsclientw.exe -n > -a C:\Programme\Emacs-24.5-Win64\bin\runemacs.exe -c "täst.txt" - result: > now this file opened properly As expected. > I now also did another test with a minimum init.el which just had > "(server-start)" - everything worked fine - but this does not mean that the > dired-problem is not there, because this one only occurs sometimes As long as you use native Windows programs to create files, and as long as your Emacs doesn't have those wrong settings of coding systems, you should not see such problems. At least not in Emacs 24.5 and later. > So is this a config problem, and if yes: can you give me a hint how to get > the right setup in order to cover all 3 problems ? The advice is (a) don't change any of the coding-systems in your init file, and (b) use only native Windows utilities outside of Emacs to create/modify files whose names include non-ASCII characters.