From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.bugs Subject: bug#13907: 24.3.50; cygw32 build mishandles drag-n-dropped file with non-ASCII characters in name Date: Sun, 10 Mar 2013 16:00:13 -0700 Message-ID: <513D107D.3020309@dancol.org> References: <513A1D4D.5060908@cornell.edu> <8338w5zni7.fsf@gnu.org> <83vc91y6m4.fsf@gnu.org> <83txoly5ov.fsf@gnu.org> <513A5741.8060804@dancol.org> <513AA672.80903@dancol.org> <513AA69E.5080908@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="----enig2VBAKVHPFCJADAHQDPUEV" X-Trace: ger.gmane.org 1362956476 31447 80.91.229.3 (10 Mar 2013 23:01:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 10 Mar 2013 23:01:16 +0000 (UTC) Cc: 13907@debbugs.gnu.org To: Eli Zaretskii , kbrown@cornell.edu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Mar 11 00:01:40 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UEpFL-0006qB-PW for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Mar 2013 00:01:40 +0100 Original-Received: from localhost ([::1]:33312 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UEpEz-0005ab-CY for geb-bug-gnu-emacs@m.gmane.org; Sun, 10 Mar 2013 19:01:17 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:56419) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UEpEv-0005aQ-97 for bug-gnu-emacs@gnu.org; Sun, 10 Mar 2013 19:01:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UEpEu-00026F-7J for bug-gnu-emacs@gnu.org; Sun, 10 Mar 2013 19:01:13 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40574) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UEpEu-00026B-3y for bug-gnu-emacs@gnu.org; Sun, 10 Mar 2013 19:01:12 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UEpFh-0000vX-VH for bug-gnu-emacs@gnu.org; Sun, 10 Mar 2013 19:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Colascione Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Mar 2013 23:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13907 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13907-submit@debbugs.gnu.org id=B13907.13629564883521 (code B ref 13907); Sun, 10 Mar 2013 23:02:01 +0000 Original-Received: (at 13907) by debbugs.gnu.org; 10 Mar 2013 23:01:28 +0000 Original-Received: from localhost ([127.0.0.1]:44682 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UEpF9-0000uj-8i for submit@debbugs.gnu.org; Sun, 10 Mar 2013 19:01:27 -0400 Original-Received: from dancol.org ([96.126.100.184]:58730) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UEpF4-0000uZ-7i for 13907@debbugs.gnu.org; Sun, 10 Mar 2013 19:01:24 -0400 Original-Received: from c-76-22-66-162.hsd1.wa.comcast.net ([76.22.66.162] helo=[0.0.0.0]) by dancol.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1UEpE7-0003Q6-U3; Sun, 10 Mar 2013 16:00:24 -0700 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130215 Thunderbird/17.0.3 In-Reply-To: <513AA69E.5080908@dancol.org> X-Enigmail-Version: 1.5.1 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:72304 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2VBAKVHPFCJADAHQDPUEV Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 3/8/2013 7:03 PM, Daniel Colascione wrote: > On 3/8/2013 7:03 PM, Daniel Colascione wrote: >> On 3/8/2013 1:25 PM, Daniel Colascione wrote: >>> On 3/8/2013 12:53 PM, Eli Zaretskii wrote: >>>>> Date: Fri, 08 Mar 2013 22:33:07 +0200 >>>>> From: Eli Zaretskii >>>>> Cc: 13907@debbugs.gnu.org >>>>> >>>>> And one more question: what is the value of file-name _before_ it i= s >>>>> passed to cygwin-convert-file-name-from-windows? Does it perhaps >>>>> already have the U-umlaut replaced by a blank? >>>> >>>> I think the problem is on the C level, not on the Lisp level. Take = a >>>> look at w32term.c:construct_drag_n_drop -- it uses ANSI version of >>>> DragQueryFile to get the file name, then decodes it by DECODE_FILE. >>>> But DECODE_FILE uses UTF-8 in the cygw32 build, so this is >>>> inappropriate for decoding file names that come from Windows APIs. >>>> >>>> Instead, in the cygw32 build, construct_drag_n_drop should use >>>> DragQueryFileW and convert the file name to the internal Emacs >>>> representation using from_unicode. >>>> >>> >>> >>> Thanks for finding that! I've been swamped this week, and I haven't b= een able to >>> do any investigation. I'll see whether I can come up with a fix this = weekend. >>> >> >> The patch below resolves the issue for me. Assuming it's acceptable, w= here >> should I install it? bzr trunk revision 111999 resolves this bug, the title-bar bug, and a few= others relating to mismatches between the Windows GUI encoding and the Cygwin sy= stem encoding. Ken, it's probably this change that you want to backport to you= r Cygwin package. ------enig2VBAKVHPFCJADAHQDPUEV Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (Cygwin) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlE9EH0ACgkQ17c2LVA10Vu3MgCgqYG/0lKWMXQO/3UyZM0r+5hP xN4AnRjgb3mOVzOuWGrYQyB5Zru+xXfo =dd55 -----END PGP SIGNATURE----- ------enig2VBAKVHPFCJADAHQDPUEV--