Comment 3 for bug 9236

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Tue, 19 Oct 2004 02:54:15 +0900
From: Fumitoshi UKAI <email address hidden>
To: <email address hidden>
Subject: all character classes match "[" in utf-8 locales

Package: gawk
Version: 1:3.1.4-1
Severity: important
Tags: patch

This is the same bug as Bug#274352 in grep.

 % echo '[' | LANG=en_US.UTF-8 gawk '/[[:space:]]/ { print }'
 [
 %

This can be fixed by this patch, as well as grep.

--- dfa.c~ 2004-10-19 01:18:31.000000000 +0900
+++ dfa.c 2004-10-19 02:53:28.000000000 +0900
@@ -645,7 +645,7 @@
         work_mbc->coll_elems[work_mbc->ncoll_elems++] = elem;
       }
    }
- wc = WEOF;
+ wc = wc1 = WEOF;
      }
    else
      /* We treat '[' as a normal character here. */

Regards,
Fumitoshi UKAI