www.delorie.com/archives/browse.cgi | search |
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:date:from:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; q=dns; s= | |
default; b=n1TXoRuHz7LJWPXXzOVAR054A3DHLKcJhLs8AA3Jt5FdWmzr3clgR | |
9T3LkhusjcDyHFKmQwxXNR8hL+lswlyVDzCt1fUCLeBb+vX1Hfe307QHUV76kHiD | |
prYokyRNJ11TvpQz4tbfM0yk4m8NpbDLeeRpLXuFf6LvwfKI/jM4QY= | |
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:date:from:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; s=default; | |
bh=ly41+8vg6g5Qu/iu3YPDfj9Sev4=; b=cROGf52f0dxrr6Aa+NOuZfmren8A | |
Zdk6b2c7NLldw2Rwjj3xNN7whpd/C725GV/2Xqmsj8E2nvgfSokeE0W8x4H9WhyP | |
vIhunupIBNZJkbRd9RuvJ1qat71UuKYxtE9SYzxY/DZ/Q2waq3yJKRxQYWLNTlUN | |
hR3Smi3pr0EgBEE= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
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=-5.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 |
X-HELO: | calimero.vinschen.de |
Date: | Thu, 29 Oct 2015 09:30:57 +0100 |
From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: Bug in collation functions? |
Message-ID: | <20151029083057.GH5319@calimero.vinschen.de> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
References: | <563148AF DOT 1000502 AT cornell DOT edu> <5631996D DOT 7040908 AT redhat DOT com> <20151029075050 DOT GE5319 AT calimero DOT vinschen DOT de> |
MIME-Version: | 1.0 |
In-Reply-To: | <20151029075050.GE5319@calimero.vinschen.de> |
User-Agent: | Mutt/1.5.23 (2014-03-12) |
--BoBwh7s2kSeeheTs Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Oct 29 08:50, Corinna Vinschen wrote: > On Oct 28 21:58, Eric Blake wrote: > > On 10/28/2015 04:14 PM, Ken Brown wrote: > > > It's my understanding that collation is supposed to take whitespace a= nd > > > punctuation into account in the POSIX locale but not in other locales. > >=20 > > Not quite right. It is up to the locale definition whether whitespace > > affects collation. But you are correct that in the POSIX locale, > > whitespace must not be ignored in collation. > >=20 > > > This doesn't seem to be the case on Cygwin. Here's a test case using > > > wcscoll, but the same problem occurs with strcoll. > >=20 > > That's because the locale definitions are different in cygwin than they > > are in glibc. But it is not a bug in Cygwin; POSIX allows for different > > systems to have different locale definitions while still using the same > > locale name like en_US.UTF-8. >=20 > Btw, strcoll and wcscoll in Cygwin are implemented using the Windows > function CompareStringW with the LCID set to the locale matching the > POSIX locale setting. I'm rather glad I didn't have to implement this > by myself... :} OTOH, CompareString has a couple of flags to control its behaviour, see https://msdn.microsoft.com/en-us/library/windows/desktop/dd317761%28v=3Dvs.= 85%29.aspx Right now Cygwin calls CompareStringW with dwCmpFlags set to 0, but there are flags like NORM_IGNORENONSPACE, NORM_IGNORESYMBOLS. I'm open to a discussion how to change the settings to more closely resemble the rules on Linux. E.g. wcscoll simply calls wcscmp rather than CompareStringW for the C/POSIX locale anyway. So, would it makes sense to set the flags to NORM_IGNORESYMBOLS in other locales? Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --BoBwh7s2kSeeheTs Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWMdlBAAoJEPU2Bp2uRE+gHbIQAJCfLjX0JnlhuZ4tIz1bjyUR RpL+l6421qIWgHX1KSjz0TxS9yxptxd476+K3LpYvk6fLdOA4xtQ2hkY3IuPLUHh 3LdGSQbX1726v8WFsQUlGxy4SPu5gtAzPXxpEyw6iuIlZmjYxw2Xg3CVjw6d4OxK MfwQSgHqJmX5slYcFMkqwpoYg2CjLNsLO3FRsb8Vq/Azrrxx//yOFqxSW8oqpR0s Txc/zF3spi+kNQonOJX5h6H/HduUviojjsrqiWrEU38seHPSyWP9x308Nlzuym7R 2iQNd2QmN38c8yJNK4xtuJidpvEU2aji17G9P0bBZZC53MPCK68uOK/4M7CktlIz AeWKbVCv1wMS3t4TmqDhHagx8vT59iWGp/FprtK9PXOYSI7IMFCLtcxB++nAK/WM cq1IK2Nh5joJRNS25F1w8ujjUA2Vb52+K/hELvSF3kmE6jWFbqdHqzIHXhQZBEQJ bPAHKo1EGE0x6i5QhQz/nmnZ+TNxnBpcW5rY3QGPCP9mutewg5BEzyGW/DI/fl0u WMpPBQ3HBwsOcdwrK2frzBnwCglpA959kyXC/8Y9KgzeJg0Pmct+jKGSIM4Ijmig ZwBgVSD9uQooT/Lk67TkoLtj8J8agYcz/4woNxboOoDEQV7FQjb47lzOYijyX/KS a4WCAvfwg7U4Z1Ng59FF =Ge3y -----END PGP SIGNATURE----- --BoBwh7s2kSeeheTs--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |