Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

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

share|improve this answer
    
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)? –  Martin Sep 2 '13 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 '13 at 16:27
    
yes, I read that discussion. Thanks a lot for your help! –  Martin Sep 2 '13 at 20:59
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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