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 Answers1

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

Drew
  • 2,144