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 32643
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: Unicode, Korean, normalization form, Mac OS X and tab completion
- Date: Sun, 1 Jun 2014 02:25:27 +0000
- Cc: Zsh List Hackers' <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=date:from:to:cc:subject:message-id :references:mime-version:content-type:content-transfer-encoding :in-reply-to; s=mesmtp; bh=BsKQRu6Urlmxb1CbqO2iioffcvk=; b=02vH7 u28r6y9G0fpzys5SCNO4hDohNhgO/6uRIVwvMar2PZXWUukS9+qHqT3JVApin5Tc t+vL0FG1cHVahK3MQMRifYuXEkH6UYzoQrb+GPyCEJxHoNLlTglNrmHzLJQKgBbW pxwju0aFPivmrPox8UUl2ZziNltXSyHgx7jqdM=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=date:from:to:cc:subject:message-id :references:mime-version:content-type:content-transfer-encoding :in-reply-to; s=smtpout; bh=BsKQRu6Urlmxb1CbqO2iioffcvk=; b=kwCo /i56WxxvOHIcIwyHa+NCCKbTAjxCiFhy4n0kWEuk2MIdUJc1+235MYfUUpOA1RHg ZilJWD2Byl1oOKoqVgjDd0RMYCUJJZV7ehmfK6osOP5gun87SX2MCtQ7fwiO2Sm0 nLCZTknfFQptoO+PdDjTBzSRn3+y+3TAASLV8nQ=
- In-reply-to: <140531142926.ZM556@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>
Bart Schaefer wrote on Sat, May 31, 2014 at 14:29:26 -0700:
> On May 31, 8:16pm, Peter Stephenson wrote:
> }
> } I'm currently wondering if there is scope for normalising keyboard input
> } really early --- before we feed it back to the shell --- and turning it
> } back into the usual keyboard form right at the end
>
> Per thread with Chet, I think normalizing the filesystem is the easier
> way to go. Keyboard input is already as close to normalized as it needs
> to be, I think, and with only a couple of exceptions all the names we
> get from the filesystem come through zreaddir().
What about, say, people doing 'ls' and copy-pasting a filename from the
output into a command line? Wouldn't that result in NFD keyboard
input?
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.
Also, other unixes allow you to have both the NFC-form and NFD-form in
the same directory, e.g., 'touch fooá fooá' works just fine on linux
ext4 (the first filename is composed, the second decomposed); in such
cases normalization magic should not be done.
Fun! :-)
Daniel
Messages sorted by:
Reverse Date,
Date,
Thread,
Author