From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id CC0E03858D1E; Mon, 18 Mar 2024 10:32:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CC0E03858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1710757979; bh=jZQL47L5CQ52hzFENdJ2+JJYwTDiuWbV7FHA0S+ooMI=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=weMymvVsiFwOaxa+lx111b9Q0GvHRe10gV4/s5xcUZnhwNfweFtuO8h+LtCNzqIB3 Jv5ElxRJI7d0TmK916GUouh+x8FDePPZNjg+f0GBQ3y3mwdr03MG17/sd9peAGAbbK hCfmY6LGUpFz1u+e7dP4wVLbf1zPSJC3q6hwLrgg= Received: by calimero.vinschen.de (Postfix, from userid 500) id 1E326A80BFE; Mon, 18 Mar 2024 11:32:58 +0100 (CET) Date: Mon, 18 Mar 2024 11:32:58 +0100 From: Corinna Vinschen To: Michael Goldshteyn Cc: cygwin@cygwin.com Subject: Re: Additional odd behavior after my upgrade to the latest CYGWIN64 version Message-ID: Reply-To: cygwin@cygwin.com Mail-Followup-To: Michael Goldshteyn , cygwin@cygwin.com References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: List-Id: 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@lambda /cygdrive/c/Users/Michael > $ echo "$CYGWIN" > glob:ignorecase > Michael@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