delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/07/26/15:30:32

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:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=lZIn5LNToYA5DSqF
6+l5dDvmSHRcoTHU8jfGFtIoM+qtqVQaYcwIkUKeX0RvtYz79ycXiXH26ds2BqT8
kmkGaU3hgsUJfYFDBM93ECV+VgkZkXo1/msWljxhSsQEjMLJ9OXwocHa8cIoqA63
sJo3OYpLt/F1SySVByWJYVoNQ1U=
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:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=Sq9IHnpMo1HcWi5Njg7eoT
6nhMs=; b=qeTQ6CDcwMNL3IAKiAVpqwoxya8zsV2MJwTAUGmBbr/vHmaXNaYYqV
yzuEzffxsjppLEm//CjGqiIwY4PCBUllAXo8vUzNYgew7WXWz3BYqmwurAJWT8s5
Kq6Pea4B2IyFzQW0XQyMRIOgx2sGfjOmuxnoWnuZaSc8uOF4veIIY=
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=-2.8 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=UD:en_US.UTF-8, UD:UTF-8, en_US.UTF-8, en_us.utf-8
X-HELO: limerock02.mail.cornell.edu
X-CornellRouted: This message has been Routed already.
Subject: Re: [ANNOUNCEMENT] TEST RELEASE: Cygwin 2.6.0-0.2
To: cygwin AT cygwin DOT com
References: <announce DOT 20160726140018 DOT GQ11373 AT calimero DOT vinschen DOT de> <9c9ac779-9101-c7e2-e350-52b2b826f05d AT cornell DOT edu> <CAK-n8j7O8xEQ4mo7Nzt0s6SpjKAOhkK=O3kSnTz+aF4q9x+f5A AT mail DOT gmail DOT com> <20160726173757 DOT GT11373 AT calimero DOT vinschen DOT de>
From: Ken Brown <kbrown AT cornell DOT edu>
Message-ID: <2e38312b-0ce9-e78b-d755-e32300f9e743@cornell.edu>
Date: Tue, 26 Jul 2016 15:30:10 -0400
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0
MIME-Version: 1.0
In-Reply-To: <20160726173757.GT11373@calimero.vinschen.de>
X-PMX-Cornell-Gauge: Gauge=XXXXX
X-PMX-CORNELL-AUTH-RESULTS: dkim-out=none;
X-IsSubscribed: yes

On 7/26/2016 1:37 PM, Corinna Vinschen wrote:
> Now for some testing of the new API...? :)

There seems to be a collation bug.  Here's a test case, extracted from 
the emacs test suite:

$ cat collation_test.c
#include <wchar.h>
#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>

int
main (void)
{
   locale_t loc = newlocale (LC_COLLATE_MASK | LC_CTYPE_MASK,
                             "en_US.UTF-8", 0);
   if (!loc)
     {
       perror ("newlocale");
       exit (1);
     }

   wchar_t *p1 = L"xyzzy", *p2 = L"XYZZY";
   errno = 0;
   int res = wcscoll_l (p1, p2, loc);
   if (errno)
     {
       perror ("wcscoll_l");
       exit (1);
     }
   char res_ch = res < 0 ? '<' : res > 0 ? '>' : '=';
   freelocale (loc);
   printf ("\"%ls\" %c \"%ls\" in locale en_US.UTF-8\n", p1, res_ch, p2);
}

$ gcc collation_test.c

$ ./a
"xyzzy" > "XYZZY" in locale en_US.UTF-8

Ken

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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