From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22988 invoked by alias); 18 Jul 2016 09:33:40 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 38877 Received: (qmail 24077 invoked from network); 18 Jul 2016 09:33:40 -0000 X-Qmail-Scanner-Diagnostics: from mailout3.w1.samsung.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(210.118.77.13):SA:0(-1.3/5.0):. Processed in 0.14547 secs); 18 Jul 2016 09:33:40 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=RP_MATCHES_RCVD autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: p.stephenson@samsung.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at samsung.com does not designate permitted sender hosts) X-AuditID: cbfec7f4-f796c6d000001486-04-578ca26cecdf Date: Mon, 18 Jul 2016 10:33:29 +0100 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: Incorrect sorting of Polish characters Message-id: <20160718103329.7acbb1b1@pwslap01u.europe.root.pri> In-reply-to: <160716130718.ZM4513@torch.brasslantern.com> References: <160716130718.ZM4513@torch.brasslantern.com> Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrELMWRmVeSWpSXmKPExsVy+t/xy7o5i3rCDeY/UbY42PyQyYHRY9XB D0wBjFFcNimpOZllqUX6dglcGb2H1zMVnOGoWD1jOWsD4we2LkZODgkBE4krz28zQthiEhfu rQeKc3EICSxllDj05w8rhDODSaJt4wp2COcco8T7nTdYIJyzjBINuxqYQfpZBFQl5vX9ZgKx 2QQMJaZumg02V0RAXOLs2vMsILawgLFE08vlYPW8AvYSy/9vAKvhFLCUaNj/F2poI6PEnlcP wA7kF9CXuPr3ExPEgfYSM6+cYYRoFpT4Mfke2FBmAS2JzduaWCFseYnNa96CLRASUJe4cXc3 +wRG4VlIWmYhaZmFpGUBI/MqRtHU0uSC4qT0XEO94sTc4tK8dL3k/NxNjJCQ/rKDcfExq0OM AhyMSjy8N9Z2hwuxJpYVV+YeYpTgYFYS4V20oCdciDclsbIqtSg/vqg0J7X4EKM0B4uSOO/c Xe9DhATSE0tSs1NTC1KLYLJMHJxSDYz+Jqwfj7JxTRSuWXR62ufXfmtOT71+Z4MbQ8oy0e5H zbVLth9/L5ji1rjiTYPPquSnezbwLn0muTtvT4Nxl3jafJnaoFWThf2ufrr2TCUs+6C4x4XY 2/K2AZNl2F7wFxedW8y55z7na8vj7dZ9Oec08udfLZt4QuDcpG8xk14ptKsvNDPbvUxfiaU4 I9FQi7moOBEA4AKBEWUCAAA= On Sat, 16 Jul 2016 13:07:18 -0700 Bart Schaefer wrote: > On Jul 16, 7:17pm, M. Bartoszkiewicz wrote: > } > } I have noticed that some Polish characters > } are sorted incorrectly in glob expansion (but > } correctly in other contexts). > > Both parameter expansion and globbing are using qsort() and each > passes a pointer to a function that calls strcoll() underneath, so I > suspect this is a (removal of) metafication issue, because that's > done in the parameter function but not in the globbing one. A simple-minded change to pass strcoll() unmetafied versions of the strings does seem to fix the problem, so it looks like this is the case. However, that's not the right fix as we only want to unmetafy once per input string, not once per comparison, and below the call to qsort() there's quite a lot of internal string handling. An equally simple-minded fix around the call to qsort() (saving and restoring the strings) didn't seem to work. So this needs a bit more thought. This should be added to the tests when it's passing. pws