From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21391 invoked by alias); 29 May 2015 11:13:02 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 20237 Received: (qmail 23303 invoked from network); 29 May 2015 11:13:00 -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: cbfec7f4-f79c56d0000012ee-72-556849b66f06 Date: Fri, 29 May 2015 12:12:46 +0100 From: Peter Stephenson To: Zsh Users Subject: Re: Three-byte UTF-8 chars and $functions Message-id: <20150529121246.5d13e349@pwslap01u.europe.root.pri> In-reply-to: <5567912F.9040004@pobox.com> References: <5567912F.9040004@pobox.com> 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=UTF-8 Content-transfer-encoding: quoted-printable X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrILMWRmVeSWpSXmKPExsVy+t/xy7rbPDNCDe6tsLHYcXIlowOjx6qD H5gCGKO4bFJSczLLUov07RK4Mg7NfcdasJC7onfBV7YGxnscXYycHBICJhLz5+5jhrDFJC7c W88GYgsJLGWUmHbErIuRC8iexiSx8fhBJojENkaJFTs8QWwWAVWJ01O/sYLYbAKGElM3zWYE sUUEFCXO/PoGVi8sYCSx7Wc7C4jNK2AvMev5CqAaDg5OAU2J16uVIUZqSHxY1wfWyi+gL3H1 7ycmiHvsJWZeOcMI0Soo8WPyPbAxzALqEpPmLWKGsLUlnry7wAoxR13ixt3d7BMYhWYhaZmF pGUWkpYFjMyrGEVTS5MLipPScw31ihNzi0vz0vWS83M3MUIC9ssOxsXHrA4xCnAwKvHwGlxL DxViTSwrrsw9xCjBwawkwrtLJyNUiDclsbIqtSg/vqg0J7X4EKM0B4uSOO/cXe9DhATSE0tS s1NTC1KLYLJMHJxSDYzLP/ffbqjIv+vK7r0v+eXL8GWX+w5t558+t+xN/9QPpQKpe0zmST3V k6s4e+KzpMnWJikFneq9W0QCGZLL5ZRCKh//itlUXGOtr+tlEPr/zN1Xl7h+y+exTrdtlJnz QuFu4v4M+bBNIe2xL9XuGoe/vCC+PmdR4+W7/zyex0cq3m7ODPJfzaLEUpyRaKjFXFScCAAI qJWpVAIAAA== On Thu, 28 May 2015 18:05:35 -0400 Andrew Janke wrote: > I'm seeing some odd behavior related to multibyte UTF-8 characters that=20 > I don't understand. Maybe one of you could help me figure out? I don't=20 > know if it's user error, incorrect behavior expectations on my part, or=20 > an actual character handling issue. It's what we call "a bug". You may not have heard the expression before as it doesn't happen that much round here. Sigh. > function foo () { echo '=E2=96=B8' } >=20 > # But capture their string representations... > foo_str=3D"${functions[foo]}" > > # ...and in those strings, I see foo as 2 chars longer than bar You know when you see something funny in a function and you're too cowardly to change it so you just stick a comment about it there and forget about it? This happens. See if there are still any remaining problems. pws diff --git a/Src/Modules/parameter.c b/Src/Modules/parameter.c index 55157a9..04d4485 100644 --- a/Src/Modules/parameter.c +++ b/Src/Modules/parameter.c @@ -410,11 +410,6 @@ getfunction(UNUSED(HashTable ht), const char *name, in= t dis) } else h =3D dyncat(start, t); zsfree(t); - /* - * TBD: Is this unmetafy correct? Surely as this - * is a parameter value it stays metafied? - */ - unmetafy(h, NULL); =20 if (shf->redir) { t =3D getpermtext(shf->redir, NULL, 1);