about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2003-12-03 10:54:36 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2003-12-03 10:54:36 +0000
commit7d672455bbc8f2142e9fa53db25974d012293b5e (patch)
tree272d7e610a6ef426cce50b835052d1496f63f9f4
parentb456768681f56e1d7d2bc1a29e932fd936aff9fd (diff)
downloadzsh-7d672455bbc8f2142e9fa53db25974d012293b5e.tar.gz
zsh-7d672455bbc8f2142e9fa53db25974d012293b5e.tar.xz
zsh-7d672455bbc8f2142e9fa53db25974d012293b5e.zip
19269: 8-bit characters in character classes
-rw-r--r--ChangeLog6
-rwxr-xr-xMisc/globtests1
-rw-r--r--Src/pattern.c2
-rw-r--r--Test/D02glob.ztst1
4 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index f09ffc119..815076754 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2003-12-03  Peter Stephenson  <pws@csr.com>
+
+	* 19269: Src/pattern.c, Misc/globtests, Test/D02glob.ztst:
+	8-bit characters didn't work in character classes where
+	chars were signed.
+
 2003-11-28  Doug Kearns  <djkea2@mugca.its.monash.edu.au>
 
 	* unposted: Completion/Unix/Command/_elinks: update for version 0.4.3
diff --git a/Misc/globtests b/Misc/globtests
index 9fbab98fa..2306000bf 100755
--- a/Misc/globtests
+++ b/Misc/globtests
@@ -179,5 +179,6 @@ f atest/path    *((#s)|/)test((#e)|/)*
 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."
diff --git a/Src/pattern.c b/Src/pattern.c
index 71c6b3410..b62cbcd37 100644
--- a/Src/pattern.c
+++ b/Src/pattern.c
@@ -2265,7 +2265,7 @@ patmatchrange(char *range, int ch)
 		DPUTS(1, "BUG: unknown metacharacter in range.");
 		break;
 	    }
-	} else if (*range == ch)
+	} else if (STOUC(*range) == ch)
 	    return 1;
     }
     return 0;
diff --git a/Test/D02glob.ztst b/Test/D02glob.ztst
index 1c8b7acc6..7f4b9c9ed 100644
--- a/Test/D02glob.ztst
+++ b/Test/D02glob.ztst
@@ -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