all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#13907: 24.3.50; cygw32 build mishandles drag-n-dropped file with non-ASCII characters in name
@ 2013-03-08 17:18 Ken Brown
  2013-03-08 19:42 ` Eli Zaretskii
  0 siblings, 1 reply; 18+ messages in thread
From: Ken Brown @ 2013-03-08 17:18 UTC (permalink / raw)
  To: 13907

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")
"/tmp/Ü.txt"

(setq coding (or file-name-coding-system
		 default-file-name-coding-system))
utf-8-unix

(setq file-name
       (mapconcat 'url-hexify-string
		 (split-string (encode-coding-string f coding)
			       "/")
		 "/"))
"/tmp/%C3%9C.txt"

(setq uri (concat
	   (if (eq system-type 'cygwin)
	       "file://"
	     "file:")
	   file-name))
"file:///tmp/%C3%9C.txt"

(dnd-get-local-file-name uri t)
"/tmp/Ü.txt"


In GNU Emacs 24.3.50.4 (i686-pc-cygwin)
  of 2013-03-06 on fiona
Bzr revision: 111954 dmantipov@yandex.ru-20130306112630-ooq2zc4oq664z5zc
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






^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2013-03-11  9:51 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-08 17:18 bug#13907: 24.3.50; cygw32 build mishandles drag-n-dropped file with non-ASCII characters in name Ken Brown
2013-03-08 19:42 ` Eli Zaretskii
2013-03-08 20:06   ` Eli Zaretskii
2013-03-08 20:33   ` Eli Zaretskii
2013-03-08 20:53     ` Eli Zaretskii
2013-03-08 21:03       ` Ken Brown
2013-03-09  8:09         ` Eli Zaretskii
2013-03-08 21:25       ` Daniel Colascione
2013-03-09  3:03         ` Daniel Colascione
2013-03-09  3:03           ` Daniel Colascione
2013-03-09  8:32             ` Eli Zaretskii
2013-03-09  8:37               ` Daniel Colascione
2013-03-09  8:51                 ` Eli Zaretskii
2013-03-09  8:37               ` Daniel Colascione
2013-03-10 23:00             ` Daniel Colascione
2013-03-11  9:51               ` Ken Brown
2013-03-09 12:16           ` Ken Brown
2013-03-09 19:31           ` Glenn Morris

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.