Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: mkdir builtin and $'\0'
- X-seq: zsh-workers 36224
 
- From: Stephane Chazelas <stephane.chazelas@xxxxxxxxx>
 
- To: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
 
- Subject: Re: mkdir builtin and $'\0'
 
- Date: Tue, 18 Aug 2015 13:55:19 +0100
 
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
 
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;        d=gmail.com; s=20120113;        h=date:from:to:cc:subject:message-id:mail-followup-to:references         :mime-version:content-type:content-disposition:in-reply-to         :user-agent;        bh=UH5kp8x8kd5h8UPTAPTf2ElQxNaGBL9Wl+gQqIOHXMM=;        b=W9kj7ZBkv0GxbevvjzAtY/NylcXR0ZmgSSFZunPWdNrMFzq4amLl4wawgsaV2caa60         vEjXXc9SwMZhAGMLMosft35W3Vrar9iS6yYbd4RRTP70sBCqGNPWrSgL1acgg8F6V5QQ         i3VFzUjmZ65HCUj6SMuNEpQSS7bjiytLs4kBiyxv1/CQYJlrlsp1Uh5R1RFLYxWLjwQW         AtHJWp8zB/LK+4njrmyvEpx3tqCz7Wx4QnjZxgXbNLypzlKf75HEWG5GoFIvsMkorUXv         R62YhoqlItrMsL35K3GJ8NA82urRYms30HWAkwAJxKD52qYmb76qMQzgLyvwBGE2qOky         1OCA==
 
- In-reply-to: <20150818122755.39fe78c8@pwslap01u.europe.root.pri>
 
- List-help: <mailto:zsh-workers-help@zsh.org>
 
- List-id: Zsh Workers List <zsh-workers.zsh.org>
 
- List-post: <mailto:zsh-workers@zsh.org>
 
- Mail-followup-to: Peter Stephenson <p.stephenson@xxxxxxxxxxx>,	Zsh hackers list <zsh-workers@xxxxxxx>
 
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
 
- References: <20150818091904.GA5389@chaz.gmail.com> <20150818104911.034b6705@pwslap01u.europe.root.pri> <20150818111134.GA5629@chaz.gmail.com> <20150818122755.39fe78c8@pwslap01u.europe.root.pri>
 
2015-08-18 12:27:55 +0100, Peter Stephenson:
> On Tue, 18 Aug 2015 12:11:34 +0100
> Stephane Chazelas <stephane.chazelas@xxxxxxxxx> wrote:
> > $ strftime $'%Y\0%m\0%d' 0 | sed -n l
> > 1970\203 01\203 01$
> 
> This should fix that one.
[...]
Thanks, though it seems to have broken some internationalisation
support. I was trying to see what would happen for month names
that include that \203 byte (like October in ar_AE.UTF-8), but
it seems to also break with some other byte values:
Without the fix:
~$ LC_ALL=ar_AE.UTF-8 date -d @0 +%b | hd
00000000  d9 8a d9 86 d8 a7 0a                              |.......|
00000007
~$ LC_ALL=ar_AE.UTF-8 strftime %b 0  | hd
00000000  d9 8a d9 86 d8 a7 0a                              |.......|
00000007
With the git head:
~$ LC_ALL=ar_AE.UTF-8 strftime %b 0  | hd
00000000  d9 d9 d8 a7 0a                                    |.....|
00000005
I suppose those 8a 86 are special as well.
For \203 0x83:
~$ LC_ALL=ar_AE.UTF-8 date -d @1443697200 +%b | hd
00000000  d8 a3 d9 83 d8 aa 0a                              |.......|
00000007
~$ LC_ALL=ar_AE.UTF-8 strftime %b 1443697200 | hd
00000000  d8 a3 d9 f8 aa 0a                                 |......|
00000006
-- 
Stephane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author