zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: zsh-workers@zsh.org
Subject: Re: Incorrect sorting of Polish characters
Date: Mon, 18 Jul 2016 10:33:29 +0100	[thread overview]
Message-ID: <20160718103329.7acbb1b1@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <160716130718.ZM4513@torch.brasslantern.com>

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


  reply	other threads:[~2016-07-18  9:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-16 17:17 Michał Bartoszkiewicz
2016-07-16 20:07 ` Bart Schaefer
2016-07-18  9:33   ` Peter Stephenson [this message]
2016-07-18 10:17     ` Peter Stephenson
2016-07-20  5:05       ` Bart Schaefer
2016-07-20  8:35         ` Peter Stephenson
2016-07-22  0:38           ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160718103329.7acbb1b1@pwslap01u.europe.root.pri \
    --to=p.stephenson@samsung.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).