From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10823 invoked by alias); 8 Jun 2015 08:44:37 -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: 35416 Received: (qmail 4413 invoked from network); 8 Jun 2015 08:44:35 -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=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.0 X-AuditID: cbfec7f5-f794b6d000001495-84-557555efdc04 Date: Mon, 08 Jun 2015 09:44:20 +0100 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: In POSIX mode, ${#var} measures length in bytes, not characters Message-id: <20150608094420.1ce01d90@pwslap01u.europe.root.pri> In-reply-to: <55738EFE.1050805@inlv.org> References: <55738EFE.1050805@inlv.org> Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrELMWRmVeSWpSXmKPExsVy+t/xy7rvQ0tDDeYuMrU42PyQyYHRY9XB D0wBjFFcNimpOZllqUX6dglcGZP3t7AUHGOrmLzpAnMD4xTWLkZODgkBE4kfj76yQNhiEhfu rWfrYuTiEBJYyijxad8HRghnBpPEth8PmSCcrYwSyz+fZO9i5OBgEVCVOLPBD6SbTcBQYuqm 2YwgtoiAuMTZtedZQEqEBXwkVj3MBgnzCthLvD2wEmwxp4CGxN2TX5hAbCEBdYllG7rAWvkF 9CWu/v3EBHGQvcTMK2cYIXoFJX5Mvgd2KLOAlsTmbU2sELa8xOY1b5lh5ty4u5t9AqPQLCQt s5C0zELSsoCReRWjaGppckFxUnqukV5xYm5xaV66XnJ+7iZGSMh+3cG49JjVIUYBDkYlHt4D i0pChVgTy4orcw8xSnAwK4nwMlmUhgrxpiRWVqUW5ccXleakFh9ilOZgURLnnbnrfYiQQHpi SWp2ampBahFMlomDU6qBsV40RDV/qwLbzRV2uVYn704KEJH4uFL9Uqym6pzzu4+GMvEk8jE0 XPsW1HZM45nl8v/f1JoDfm6/v5Lp9I1+wyOnwm9Ps+k9cM6hqXd7h9iVguO2u00Cd55WN18Z 5i/msNba6u2PX6JSEYsOTJlvd0zJwi2Le0H8tJfvGYsPuUzR2D7V9ucrLyWW4oxEQy3mouJE AFLD7GRVAgAA When we started multibyte support, traditional sh's all only supported the portable character set, so we let zsh behave as if characters were all 8 bit as the least disruptive change. Multibyte is on in all other emulations, even ksh. With multibyte character sets virtually universal, it's probably time to assume obeying the localization screws things up least. With MULTIBYTE always on when available, the "EMULATE" flag becomes redundant. pws diff --git a/Src/options.c b/Src/options.c index 3e3e074..78f603d 100644 --- a/Src/options.c +++ b/Src/options.c @@ -192,7 +192,7 @@ static struct optname optns[] = { {{NULL, "monitor", OPT_SPECIAL}, MONITOR}, {{NULL, "multibyte", #ifdef MULTIBYTE_SUPPORT - OPT_EMULATE|OPT_ZSH|OPT_CSH|OPT_KSH + OPT_ALL #else 0 #endif