X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:content-type:mime-version:subject:from :in-reply-to:date:content-transfer-encoding:message-id :references:to; q=dns; s=default; b=aLgNNxltn3mOzdUh/wm3kSp7rgNg 6XD9zHQrFvm3MH9Adzh/B0ylGbdW4BYBjAjcH3oOfcwznvx2YgvKABAtB6vz9gl+ by9okUbKPg/wMJRjXYJE3DGkno1+h5eTQ2/Zyli9T+jRz2HuTjinKClYqXRq76FK oleA9i+D1GZomuY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:content-type:mime-version:subject:from :in-reply-to:date:content-transfer-encoding:message-id :references:to; s=default; bh=t+7ZQE9I0GXsFCGCRRRpf8LaeOA=; b=dN pzdOoqDQHhLbpFVYgQWEPiyZq51x9Vd1cLBzm+b+iyRdczhP7zKWOnLSXd8Drkvk QLwi5kNggQKHXifIwekNNpMJHfjXECZZhTjEsV5Ax9bD4UVmFWogOSb9Gnm3TAqc jFThH6AjySRgzctELiP/BqRxAqfYgZipVX1vtvNd0= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.9 required=5.0 tests=AWL,BAYES_50,KAM_INFOUSMEBIZ,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=Documents, brienpub AT gmail DOT com, oberstein, Oberstein X-HELO: etr-usa.com Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: cygpath -w 'a"b' From: Warren Young In-Reply-To: <000b01d1dddd$174e66a0$45eb33e0$@gmail.com> Date: Thu, 14 Jul 2016 09:24:13 -0600 Message-Id: References: <000b01d1dddd$174e66a0$45eb33e0$@gmail.com> To: The Cygwin Mailing List X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id u6EFOQOl021097 On Jul 14, 2016, at 8:36 AM, Brien Oberstein wrote: > > cygpath -w 'a"b' doesn't seem to translate the double quotes into a windows > accesible file name. Double quotes are illegal on NTFS: https://msdn.microsoft.com/library/windows/desktop/aa365247.aspx > what is the proper way to translate from cygwin > filenames with special mapped characters (eg " and : )? If you look at such a file name in Explorer, Cygwin (?) seems to be mapping double-quotes to U+F022, which is currently not defined within Unicode: http://www.fileformat.info/info/unicode/char/f022/ That’s fine as far as Cygwin goes, but it still isn’t going to make native Windows programs believe that double-quotes are legal in file names. While playing with all of this, I stumbled across an actual cygpath bug: $ mkdir 'the "foo" directory’ $ cygpath -w 'the "foo" directory/' | od -c 0000000 t h e " f o o 357 200 242 d i r e 0000020 c t o r y \ \n 0000027 That is, it translates the second double-quote only. Attempting something more like what Brien talks about also fails: $ mkdir 'a"b' $ explorer 'a"b' # opens my Documents folder! $ explorer "$(cygpath -w 'a"b')" # ditto $ explorer $(echo -e "a\xEF\x80\xA2b") # opens expected folder Strange stuff. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple