From: Eli Zaretskii <eliz@gnu.org>
To: Ken Brown <kbrown@cornell.edu>
Cc: michael@mauger.com, emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] master 7466a4d: Cygwin emacsclient handles w32 file names
Date: Wed, 01 Jul 2015 18:47:55 +0300 [thread overview]
Message-ID: <83twtn282c.fsf@gnu.org> (raw)
In-Reply-To: <5593F5BC.4030602@cornell.edu>
> Date: Wed, 01 Jul 2015 10:14:20 -0400
> From: Ken Brown <kbrown@cornell.edu>
> Cc: emacs-devel@gnu.org
>
> I've tested this a little with file names containing UTF-8-encoded
> Chinese and other non-ASCII characters, and it appears to work OK. But
> I *think* it only works because of accidental implementation details of
> cygwin-convert-file-name-from-windows (and the underlying Cygwin
> function cygwin_conv_path). Basically, it seems that these functions
> don't actually try to do any conversion if they are given a multibyte
> string instead of the expected UTF-16 string.
That was also my conclusion.
> So even though this change *might* be harmless, I think it could lead to
> bugs later if implementations change. I don't think
> cygwin-convert-file-name-from-windows should be called on a file name
> that is not known to be a (UTF-16-encoded) Windows file name.
The UTF-16 encoding is not an issue, because
cygwin-convert-file-name-from-windows calls to_unicode to ensure that.
I think this code needs to look at the result of expand-file-name for
the file and the default directory in effect, and check whether the
result begins with a drive letter. If it does, it should call
cygwin-convert-file-name-from-windows.
next prev parent reply other threads:[~2015-07-01 15:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20150630005924.5663.80677@vcs.savannah.gnu.org>
[not found] ` <E1Z9jtU-0001Tx-85@vcs.savannah.gnu.org>
2015-06-30 2:40 ` [Emacs-diffs] master 7466a4d: Cygwin emacsclient handles w32 file names Ken Brown
2015-06-30 13:56 ` Stefan Monnier
2015-07-01 14:14 ` Ken Brown
2015-07-01 15:47 ` Eli Zaretskii [this message]
2015-07-02 2:28 ` Michael Mauger
2015-07-02 19:48 ` Ken Brown
2015-07-04 15:20 ` Ken Brown
2015-07-04 18:29 ` Stefan Monnier
2015-07-04 19:05 ` Ken Brown
2015-07-07 14:36 ` Ken Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83twtn282c.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=kbrown@cornell.edu \
--cc=michael@mauger.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).