DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 51HBqjW72906565 Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 51HBqjW72906565 Authentication-Results: delorie.com; dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=pXy46AuX X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A079A3858C51 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1739793163; bh=/eUK1GjtReGyRNylb966VUTuIzDi17hLoZM1SjZgYXs=; 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=pXy46AuX5Eu92SJOfy6tyzzBDrkFLBAwvvTDt8PKE3zul+LUSTnwBLPH+KUafHbQG AcCIhH2/nmXUfUAAuDkUQc4fAhsqJglBULKYBphqbUFtRteQkbjaTDH9SuwDYcNTLD CQYX7yVlfKhItQkO7Mc3efw90r6Da4kVFWUJgY2A= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 355043858D34 Date: Mon, 17 Feb 2025 12:51:38 +0100 To: Bruno Haible Subject: Re: bug in strcasecmp and strncasecmp Message-ID: Mail-Followup-To: Bruno Haible , cygwin AT cygwin DOT com References: <2031387 DOT 2IRrRt1zHL AT nimes> <6261974 DOT 2l3rmUXbR5 AT nimes> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <6261974.2l3rmUXbR5@nimes> 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 Feb 17 11:49, Bruno Haible via Cygwin wrote: > Corinna Vinschen wrote: > > Adding a cast fixes that and I just pushed a matching patch. > > Thanks. > > > I'm just not sure if that's sufficient in the light of POSIX.1-2024. > > The above expression seems to indicate that strcasecmp and friends are > > now expected to work on multibyte codesets like UTF-8. > > They can't work on multibyte strings. This is evident from the fact that > strncasecmp gets one integer as argument, not two integers. Good point. With standard functions, one really should convert MB string to wide char and call wcscasecmp, etc. Thanks, Corinna -- 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