Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Unicode, Korean, normalization form, Mac OS X and tab completion
- X-seq: zsh-workers 32650
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: Zsh List Hackers' <zsh-workers@xxxxxxx>
- Subject: Re: Unicode, Korean, normalization form, Mac OS X and tab completion
- Date: Sun, 1 Jun 2014 16:46:34 +0000
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=date:from:to:subject:message-id:references :mime-version:content-type:in-reply-to; s=mesmtp; bh=aGBt8sOVA2U f7ti1nbnd5VP3BbM=; b=3FH6njlH0fbSO2QjWTVOhg0/RIkgwv+WtOVjw2zwic1 4V3dINuM7nrHcw/wqJ97vdNUat3BIV+Dn20Hgafu/EXn/PPST/wCsNKkeOYbYTiw QuupFwLBNVZhdaeHBVHj/i3+9hQhicdZqofxUlysi8sAGxO9CTYvg317ZbUAuJP4 =
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=date:from:to:subject:message-id :references:mime-version:content-type:in-reply-to; s=smtpout; bh=aGBt8sOVA2Uf7ti1nbnd5VP3BbM=; b=U7/PAYnV6at48bwrwnpvjzy2/gCb WnmhI4sVqu6RItrgJM76u3vaWLx9oVojSn7vfXnr9vBC6n7K33GnqiNTO7sSXKy6 1rYbgbxfIWRj+kQ9sP6Vkp5qjPC7+272pEM3u1X/dAXWl8H5nJZniNjFu0hKHqtb 2WMynw+3oG/PcWM=
- In-reply-to: <140601005624.ZM3283@torch.brasslantern.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <AB81F9FB-8D84-4656-9EFE-F2F98B196861@me.com> <20140531201617.4ca60ab8@pws-pc.ntlworld.com> <140531142926.ZM556@torch.brasslantern.com> <20140601022527.GD1820@tarsus.local2> <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
- References:
- Unicode, Korean, normalization form, Mac OS X and tab completion
- Re: Unicode, Korean, normalization form, Mac OS X and tab completion
- Re: Unicode, Korean, normalization form, Mac OS X and tab completion
- Re: Unicode, Korean, normalization form, Mac OS X and tab completion
- Re: Unicode, Korean, normalization form, Mac OS X and tab completion
Messages sorted by:
Reverse Date,
Date,
Thread,
Author