From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: Zsh List Hackers' <zsh-workers@zsh.org>
Subject: Re: Unicode, Korean, normalization form, Mac OS X and tab completion
Date: Sun, 1 Jun 2014 16:46:34 +0000 [thread overview]
Message-ID: <20140601164634.GA1965@tarsus.local2> (raw)
In-Reply-To: <140601005624.ZM3283@torch.brasslantern.com>
Bart Schaefer wrote on Sun, Jun 01, 2014 at 00:56:24 -0700:
> On Jun 1, 2:25am, Daniel Shahaf wrote:
> } FWIW, while OS X always returns NFD filenames, one could also imagine an
> } OS that is normalization-aware (forbids creating a file if its
> } normalized name is the same as the normalized name of an existing file)
> } but octet-sequence-preserving, and on such an OS both the readdir()
> } output and the user input would need to be normalized.
>
> This case is ultimately the same as your first example. Either the two
> forms of name should be treated the same, in which case normalizing the
> results of readdir() is enough, or they should be treated as different
> even though you aren't allowed to create both of them, in which case
> they should not be normalized at all (and then there better be some way
> outside the shell, e.g., at the TTY driver layer, to choose the input
> encoding).
>
> Maybe the completion system should use (#u) more often, or maybe there
> needs to be a setopt to cause all patterns to act as if (#u) ...
>
> If there's a tricky bit, it's knowing which encoding is the default for
> input so you can normalize to that one.
Well, sure, if the user input is normalized to NFC before it hits zsh,
then the problem is simpler (either NFC->NFD the input or NFD->NFC
readdir). I was trying to solve the more general problem of matching
non-normalized readdir output to non-normalized user input; perhaps
that would be an overkill.
Daniel
next prev parent reply other threads:[~2014-06-01 16:47 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-31 3:56 Kwon Yeolhyun
2014-05-31 15:21 ` Chet Ramey
2014-05-31 18:47 ` Bart Schaefer
2014-05-31 19:16 ` Peter Stephenson
2014-05-31 21:29 ` Bart Schaefer
2014-06-01 2:25 ` Daniel Shahaf
2014-06-01 5:30 ` Kwon Yeolhyun
2014-06-01 16:53 ` Daniel Shahaf
2014-06-01 7:56 ` Bart Schaefer
2014-06-01 16:46 ` Daniel Shahaf [this message]
2014-06-01 17:00 ` Jun T.
2014-06-01 19:13 ` Bart Schaefer
2014-06-02 17:01 ` Jun T.
2014-06-02 17:14 ` Bart Schaefer
2014-06-01 19:53 ` Bart Schaefer
2014-06-02 11:58 ` Kwon Yeolhyun
2014-06-02 14:23 ` Kwon Yeolhyun
2014-06-02 15:14 ` Bart Schaefer
2014-06-02 15:27 ` Peter Stephenson
2014-06-02 15:48 ` Kwon Yeolhyun
2014-06-02 15:27 ` Kwon Yeolhyun
2014-06-02 15:49 ` Bart Schaefer
2014-06-02 15:58 ` Kwon Yeolhyun
2014-06-02 14:31 ` Bart Schaefer
2014-06-02 17:15 ` Jun T.
2014-06-02 17:27 ` Bart Schaefer
2014-06-05 14:34 ` Jun T.
2014-06-05 15:00 ` Bart Schaefer
2014-06-02 5:17 ` Kwon Yeolhyun
2014-06-02 7:39 ` Jun T.
2014-06-02 8:42 ` Kwon Yeolhyun
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=20140601164634.GA1965@tarsus.local2 \
--to=d.s@daniel.shahaf.name \
--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).