3

I want to use dired+ in Emacs for browsing directory paths on Windows 7.

I'm having problems with special characters like äöü in dired mode and in attachment paths:

dired

  • When I'm trying to access a directory with M-x dired, the displayed path contains strange characters like e.g.

    • "\374" for "ü"
    • or "\366" for "ö".

Same is true for directory and file listings displayed by dired.

Is there a setting which can make dired display the characters with the correct encoding?

Attachment paths

my other problem seems to be related*:

  • I currently added a long server path as attachment directory in org-mode, like //servername/dir1/dir2/dir2/dir4/etcetera/Zubehör/ (I usually copy the UNC path in Windows 7 Explorer with the PathCopy context menu)

The path is shown like that in :ATTACH_DIR: in the properties with the "ö" correctly displayed. However, when I type C-c C-a C-f to open the directory in Windows Explorer, it creates a new directory at the same path called Zubehör and then opens this oneinstead of the right one.

How can I solve those 2 problems?

1 Answer 1

3

This is an Emacs bug, not a Dired+ bug, I believe. Emacs on Windows cannot handle Unicode chars in file names. This has been filed as a bug since at least 2010, but it was relegated to the "wishlist", so it's unclear when or whether it will ever be fixed.

http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15236

Description of a possible fix

The problem is that the mainline Emacs code uses APIs that don't accept wide characters. Examples include 'stat', 'access', 'open', 'fopen', etc. To fix the problem, we'd need to provide our own implementation of these APIs that would accept a UTF-8 encoded file name, then re-encode the file name in UTF-16, and call the Unicode APIs as part of the implementation. This is a large job.

source: Subject: Re: AW: bug#12807: 24.2; Emacs cannot edit file with funny Unicode characters in the file name on Windows; Date: Tue, 06 Nov 2012 05:57:45 +0200

solved in Emacs 24.4

IT finally works in Gnu Emacs 24.4

3
  • thanks for your help! However I wonder how this essential feature can be on the "wishlist" for years. This is an essential feature which makes me think if I have to stop using Emacs on Windows. I'm always avoiding special characters in file and path names, but I have to work with network drives where other people saev information who don't care about that. Is it possible to donate money for the fix of a special problem (like that)? Sep 2, 2013 at 7:48
  • 1
    Tell Emacs Dev - every voice helps. But FWIW, this is the response I got when I said the same thing today in the bug thread: "Wishlist" just means it's a missing feature, as opposed to a bug in an existing feature. It doesn't say anything about the importance of the feature that is missing.
    – Drew
    Sep 2, 2013 at 16:27
  • yes, I read that discussion. Thanks a lot for your help! Sep 2, 2013 at 20:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.