Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Three-byte UTF-8 chars and $functions



On Thu, 28 May 2015 18:05:35 -0400
Andrew Janke <janke@xxxxxxxxx> wrote:
> I'm seeing some odd behavior related to multibyte UTF-8 characters that 
> I don't understand. Maybe one of you could help me figure out? I don't 
> know if it's user error, incorrect behavior expectations on my part, or 
> 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 '▸' }
> 
> # But capture their string representations...
> foo_str="${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, int dis)
 	    } else
 		h = dyncat(start, t);
 	    zsfree(t);
-	    /*
-	     * TBD: Is this unmetafy correct?  Surely as this
-	     * is a parameter value it stays metafied?
-	     */
-	    unmetafy(h, NULL);
 
 	    if (shf->redir) {
 		t = getpermtext(shf->redir, NULL, 1);



Messages sorted by: Reverse Date, Date, Thread, Author