[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#13907: 24.3.50; cygw32 build mishandles drag-n-dropped file with non

From: Ken Brown
Subject: bug#13907: 24.3.50; cygw32 build mishandles drag-n-dropped file with non-ASCII characters in name
Date: Fri, 08 Mar 2013 12:18:05 -0500
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2

Create a file "/tmp/Ü.txt". (In case my mailer mangles this, that's <U-umlaut>.txt.) Now open Windows Explorer and drag this file into an emacs frame. This results in the error message

  dnd-open-local-file: Can not read file:///tmp/%20.txt

I think the problem occurs early in w32-handle-dropped-file (defined in lisp/term/w32-win.el). That function starts with

(let ((f (if (eq system-type 'cygwin)
             (cygwin-convert-file-name-from-windows file-name t)

At this point f should have the value "/tmp/Ü.txt". If I continue manually carrying out the code in w32-handle-dropped-file as though f had that value, everything is fine, as shown below. So cygwin-convert-file-name-from-windows must be doing something wrong.

Here's a session in the *scratch* buffer, imitating what w32-handle-dropped-file would do starting from the correct value of f:

(setq f "/tmp/Ü.txt")

(setq coding (or file-name-coding-system

(setq file-name
      (mapconcat 'url-hexify-string
                 (split-string (encode-coding-string f coding)

(setq uri (concat
           (if (eq system-type 'cygwin)

(dnd-get-local-file-name uri t)

In GNU Emacs (i686-pc-cygwin)
 of 2013-03-06 on fiona
Bzr revision: 111954 address@hidden
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --with-w32 CFLAGS=-g3 -O0'

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

reply via email to

[Prev in Thread] Current Thread [Next in Thread]