www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2025/02/17/06:52:45

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 <bruno AT clisp DOT org>
Subject: Re: bug in strcasecmp and strncasecmp
Message-ID: <Z7MiyoCV7hXKfteV@calimero.vinschen.de>
Mail-Followup-To: Bruno Haible <bruno AT clisp DOT org>, cygwin AT cygwin DOT com
References: <2031387 DOT 2IRrRt1zHL AT nimes> <Z7MIvRl6XKQ0Ky0m AT calimero DOT vinschen DOT de>
<6261974 DOT 2l3rmUXbR5 AT nimes>
MIME-Version: 1.0
In-Reply-To: <6261974.2l3rmUXbR5@nimes>
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Corinna Vinschen via Cygwin <cygwin AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
Cc: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>, cygwin AT cygwin DOT com
Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019