From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "cschr" Newsgroups: gmane.emacs.bugs Subject: bug#24162: 25.0.50; utf8 filenames with ornamented characters in MS-Windows Date: Sat, 6 Aug 2016 14:34:01 +0200 Message-ID: References: <831t22kyk4.fsf@gnu.org> <83mvkqjeq0.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1470487045 32126 195.159.176.226 (6 Aug 2016 12:37:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 6 Aug 2016 12:37:25 +0000 (UTC) Cc: 24162@debbugs.gnu.org To: "'Eli Zaretskii'" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Aug 06 14:37:21 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 1bW0qr-0007RY-HY for geb-bug-gnu-emacs@m.gmane.org; Sat, 06 Aug 2016 14:37:17 +0200 Original-Received: from localhost ([::1]:49284 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bW0qo-0003gp-B3 for geb-bug-gnu-emacs@m.gmane.org; Sat, 06 Aug 2016 08:37:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33191) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bW0qh-0003gU-6E for bug-gnu-emacs@gnu.org; Sat, 06 Aug 2016 08:37:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bW0qc-0000aW-4a for bug-gnu-emacs@gnu.org; Sat, 06 Aug 2016 08:37:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59896) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bW0qc-0000aS-1c for bug-gnu-emacs@gnu.org; Sat, 06 Aug 2016 08:37:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bW0qb-0007AB-Nq for bug-gnu-emacs@gnu.org; Sat, 06 Aug 2016 08:37:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "cschr" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Aug 2016 12:37: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.147048698427485 (code B ref 24162); Sat, 06 Aug 2016 12:37:01 +0000 Original-Received: (at 24162) by debbugs.gnu.org; 6 Aug 2016 12:36:24 +0000 Original-Received: from localhost ([127.0.0.1]:57193 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bW0q0-00079F-EE for submit@debbugs.gnu.org; Sat, 06 Aug 2016 08:36:24 -0400 Original-Received: from mout2.freenet.de ([195.4.92.92]:38545) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bW0py-000797-M5 for 24162@debbugs.gnu.org; Sat, 06 Aug 2016 08:36:23 -0400 Original-Received: from [195.4.92.141] (helo=mjail1.freenet.de) by mout2.freenet.de with esmtpa (ID cschr@freenet.de) (port 25) (Exim 4.85 #1) id 1bW0pu-00011M-Np; Sat, 06 Aug 2016 14:36:18 +0200 Original-Received: from localhost ([::1]:51602 helo=mjail1.freenet.de) by mjail1.freenet.de with esmtpa (ID cschr@freenet.de) (Exim 4.85 #1) id 1bW0pu-0007fD-Id; Sat, 06 Aug 2016 14:36:18 +0200 Original-Received: from mx15.freenet.de ([195.4.92.25]:47928) by mjail1.freenet.de with esmtpa (ID cschr@freenet.de) (Exim 4.85 #1) id 1bW0nj-0005qZ-0P; Sat, 06 Aug 2016 14:34:03 +0200 Original-Received: from adsl-84-226-247-201.adslplus.ch ([84.226.247.201]:52229 helo=NewPC) by mx15.freenet.de with esmtpsa (ID cschr@freenet.de) (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (port 587) (Exim 4.85 #1) id 1bW0ni-0000hW-Pp; Sat, 06 Aug 2016 14:34:02 +0200 In-Reply-To: <83mvkqjeq0.fsf@gnu.org> X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQHFI57drCAXCMD+fmJID1sij7dFeAI/oA20AfcjqU8CIUM0wKAitbaQ Content-Language: de-ch X-Originated-At: 84.226.247.201!52229 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:121893 Archived-At: Im really confused about "native port", so maybe you could just indicate = how and where do I get the right versions of all of these tools, and how I recognize they are right ? -----Original Message----- From: Eli Zaretskii [mailto:eliz@gnu.org]=20 Sent: Samstag, 6. August 2016 13:53 To: cschr Cc: 24162@debbugs.gnu.org Subject: Re: bug#24162: 25.0.50; utf8 filenames with ornamented = characters in MS-Windows [Please keep the bug address on the CC list.] > From: "cschr" > Date: Sat, 6 Aug 2016 13:30:18 +0200 >=20 > 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=20 > 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=20 > 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=20 > 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=20 > 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:=20 > 1. I took out all "...-coding-system" statements from my init.el and=20 > restarted emacs 2. I started dired and looked at the folder = "t=E4st.txt"=20 > - result: now the ornamented character is displayed uncorrectly and=20 > 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 >=20 > C:\Programme\Emacs-24.5-Win64\bin\emacsclientw.exe -n -a C:\Programme\Emacs-24.5-Win64\bin\runemacs.exe -c "t=E4st.txt" - result: > now this file opened properly As expected. > I now also did another test with a minimum init.el which just had=20 > "(server-start)" - everything worked fine - but this does not mean=20 > that the dired-problem is not there, because this one only occurs=20 > 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=20 > 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.