Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Id: Zsh Workers List <zsh-workers.zsh.org>
List-Post: <mailto:zsh-workers@zsh.org>
List-Help: <mailto:zsh-workers-help@zsh.org>
X-Qmail-Scanner-Diagnostics: from mailout3.w1.samsung.com by f.primenet.com.au (envelope-from <p.stephenson@samsung.com>, 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 <p.stephenson@samsung.com>
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:
 <CAJzQX7rXddxjFA2reSiGYHpU9Razo2vwO5F5g-4Ddz-ZjXZsUQ@mail.gmail.com>
 <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=
X-Seq: zsh-workers 38877

On Sat, 16 Jul 2016 13:07:18 -0700
Bart Schaefer <schaefer@brasslantern.com> 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

