X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3A6FC3858C78 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1710758035; bh=hdBEvjiiWvpIf4T3Ro21Rg/h3b1bbV8Nzz8Vwq4hjz0=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=cBMVrJ38C8HBnHSsFwQ2S66V2qe8dJ8hfMfp9nU44YIrnwUo3RLriUx/pfcBb32kG tiUa+JYEasW68lNd6Ln+s4Ntr9qi/Sa3rkVFvo3j2HEf0FFAloJjnkq1QC165lp5IO +L8O3p+oS9MAFYBV0DDJiCvPssvVkyPUZpRFfNkg= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CC0E03858D1E Date: Mon, 18 Mar 2024 11:32:58 +0100 To: Michael Goldshteyn Subject: Re: Additional odd behavior after my upgrade to the latest CYGWIN64 version Message-ID: Mail-Followup-To: Michael Goldshteyn , cygwin AT cygwin DOT com References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Corinna Vinschen via Cygwin Reply-To: cygwin AT cygwin DOT com Cc: Corinna Vinschen , cygwin AT cygwin DOT com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" On Mar 16 16:49, Michael Goldshteyn via Cygwin wrote: > Cygwin handles (filename) case insensitivity in a very weird way at the > Windows command prompt: > ------------------------------ > c:\Users\Michael>set CYGWIN= > > c:\Users\Michael>printf "%q " 'a' 'A' "a" "A" a A > a A a A a A > > REM OK, so far so good, but, now: > c:\Users\Michael>set CYGWIN=glob:ignorecase > > C:\Users\Michael>printf "%q " 'a' 'A' "a" "A" a A > a a a a a A > > REM So, if I don't put a command line arg into any sort of quotes, it gets > lower-cased for cygwin apps (from the Windows command line). > REM I should also add that there is no file named 'a' or 'A' in the current > working directory. > > REM This behavior, of course, doesn't happen in Cygwin bash: > ------------------------------ > C:\Users\Michael>bash > Michael AT lambda /cygdrive/c/Users/Michael > $ echo "$CYGWIN" > glob:ignorecase > Michael AT lambda /cygdrive/c/Users/Michael > $ printf "%q " 'a' 'A' "a" "A" a A > a A a A a A > $ # Output looks correct, quoted or not > ------------------------------ > The unsolicited conversion of case for quoted string is very odd, to say > the least. If you remove the glob:ignorecase from the CYGWIN env var > definition, use of filenames on Windows with Cygwin tools becomes > completely case sensitive, which is very undesirable when compared to the > fact that other Windows tools do not care about file case (i.e., case > insensitive, but preserving, as MS puts it). This was an ill-advised optimization attempt in glob. I revert the patch and pushed the change(*), so this will be fixed in Cygwin 3.5.2. For the time being, you can also test this by installing the just building Cygwin test release 3.6.0-0.85.g89afbb8d8af2, which should be available in an hour or two. Thanks, Corinna (*) https://cygwin.com/cgit/newlib-cygwin/commit/?id=70375b2205 -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple