From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5140 invoked by alias); 18 Aug 2015 12:55:27 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 36224 Received: (qmail 12151 invoked from network); 18 Aug 2015 12:55:26 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.0 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== X-Received: by 10.194.190.110 with SMTP id gp14mr13925187wjc.76.1439902522212; Tue, 18 Aug 2015 05:55:22 -0700 (PDT) Date: Tue, 18 Aug 2015 13:55:19 +0100 From: Stephane Chazelas To: Peter Stephenson Cc: Zsh hackers list Subject: Re: mkdir builtin and $'\0' Message-ID: <20150818125519.GB5629@chaz.gmail.com> Mail-Followup-To: Peter Stephenson , Zsh hackers list References: <20150818091904.GA5389@chaz.gmail.com> <20150818104911.034b6705@pwslap01u.europe.root.pri> <20150818111134.GA5629@chaz.gmail.com> <20150818122755.39fe78c8@pwslap01u.europe.root.pri> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150818122755.39fe78c8@pwslap01u.europe.root.pri> User-Agent: Mutt/1.5.21 (2010-09-15) 2015-08-18 12:27:55 +0100, Peter Stephenson: > On Tue, 18 Aug 2015 12:11:34 +0100 > Stephane Chazelas 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