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

Re: invalid characters and multi-byte [x-y] ranges



On Fri, 4 Sep 2015 12:47:19 +0100
Peter Stephenson <p.stephenson@xxxxxxxxxxx> wrote:

> On Fri, 4 Sep 2015 10:53:14 +0000
> Ismail Donmez <ismail@xxxxxxxx> wrote:
> on <p.stephenson <at> samsung.com> writes:
> > This seems to break glob tests:
> 
> I missed that --- it looks like there's something funny with the (#i)
> flag.  That may mean there's a pre-existing funny since it shouldn't be
> encountering anything looking like invalid characters.

It was just stupidity.  I changed a line that referred to an ASCII
character rather than an invalid multibyte character.

> Looks like the alias test needs updating for the new report format
> (presumably trivial).

It waqs just stupidity.  I hadn't recompiled after pulling that change.

Can't get the staff.
pws

diff --git a/Src/pattern.c b/Src/pattern.c
index 7457cbd..b4ba33e 100644
--- a/Src/pattern.c
+++ b/Src/pattern.c
@@ -1929,7 +1929,7 @@ charrefinc(char **x, char *y, int *z)
     size_t ret;
 
     if (!(patglobflags & GF_MULTIBYTE) || !(STOUC(**x) & 0x80))
-	return WCHAR_INVALID(*(*x)++);
+	return (wchar_t) STOUC(*(*x)++);
 
     ret = mbrtowc(&wc, *x, y-*x, &shiftstate);
 



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