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

Re: Probable bug in zsh 4.x



Ulrik Haugen wrote:
> I think I've found a bug in zsh versions 4.0.7 and 4.1.1.
> 
> Globbing with character classes doesn't work with local Swedish
> characters.

Thanks, that's been around ever since the pattern code was rewritten.
It would only show up where chars are signed.  See if this makes it go
away.

Index: Src/pattern.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/pattern.c,v
retrieving revision 1.15
diff -u -r1.15 pattern.c
--- Src/pattern.c	29 Oct 2003 19:17:30 -0000	1.15
+++ Src/pattern.c	3 Dec 2003 10:44:10 -0000
@@ -2265,7 +2265,7 @@
 		DPUTS(1, "BUG: unknown metacharacter in range.");
 		break;
 	    }
-	} else if (*range == ch)
+	} else if (STOUC(*range) == ch)
 	    return 1;
     }
     return 0;
Index: Misc/globtests
===================================================================
RCS file: /cvsroot/zsh/zsh/Misc/globtests,v
retrieving revision 1.2
diff -u -r1.2 globtests
--- Misc/globtests	6 Apr 2000 18:44:01 -0000	1.2
+++ Misc/globtests	3 Dec 2003 10:44:11 -0000
@@ -179,5 +179,6 @@
 f path/testy    *((#s)|/)test((#e)|/)*
 f path/testy/ohyes *((#s)|/)test((#e)|/)*
 f path/atest/ohyes *((#s)|/)test((#e)|/)*
+t björn		*[åäöÅÄÖ]*
 EOT
 print "$failed tests failed."
Index: Test/D02glob.ztst
===================================================================
RCS file: /cvsroot/zsh/zsh/Test/D02glob.ztst,v
retrieving revision 1.2
diff -u -r1.2 D02glob.ztst
--- Test/D02glob.ztst	26 Mar 2003 17:33:40 -0000	1.2
+++ Test/D02glob.ztst	3 Dec 2003 10:44:11 -0000
@@ -174,6 +174,7 @@
 >1:  [[ path/testy = *((#s)|/)test((#e)|/)* ]]
 >1:  [[ path/testy/ohyes = *((#s)|/)test((#e)|/)* ]]
 >1:  [[ path/atest/ohyes = *((#s)|/)test((#e)|/)* ]]
+>0:  [[ björn = *[åäöÅÄÖ]* ]]
 >0 tests failed.
 
   globtest globtests.ksh

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************



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