From yoshiaki@kt.rim.or.jp  Tue Jan 17 14:59:37 2006
Return-Path: <yoshiaki@kt.rim.or.jp>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 881B716A41F
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 17 Jan 2006 14:59:37 +0000 (GMT)
	(envelope-from yoshiaki@kt.rim.or.jp)
Received: from serio.al.rim.or.jp (serio.al.rim.or.jp [202.247.191.123])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 7C25343D7F
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 17 Jan 2006 14:59:15 +0000 (GMT)
	(envelope-from yoshiaki@kt.rim.or.jp)
Received: from mail6
	by serio.al.rim.or.jp (3.7W/HMX-13) id XAA03526
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 17 Jan 2006 23:59:14 +0900 (JST)
Received: from singer.tertio.atoll (TPH1Abj197.tky.mesh.ad.jp [60.237.15.197]) by mail6 (8.9.3/3.7W)
	id XAA11921 for <FreeBSD-gnats-submit@freebsd.org>; Tue, 17 Jan 2006 23:59:14 +0900 (JST)
Received: from singer.tertio.atoll (localhost [127.0.0.1])
	by singer.tertio.atoll (8.13.4/8.13.4) with ESMTP id k0HExDeM002307
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 17 Jan 2006 23:59:13 +0900 (JST)
	(envelope-from yoshiaki@kt.rim.or.jp)
Received: (from yoshiaki@localhost)
	by singer.tertio.atoll (8.13.4/8.13.4/Submit) id k0HExDbi002306;
	Tue, 17 Jan 2006 23:59:13 +0900 (JST)
	(envelope-from yoshiaki)
Message-Id: <200601171459.k0HExDbi002306@singer.tertio.atoll>
Date: Tue, 17 Jan 2006 23:59:13 +0900 (JST)
From: Yoshiaki Uchikawa <yoshiaki@kt.rim.or.jp>
Reply-To: Yoshiaki Uchikawa <yoshiaki@kt.rim.or.jp>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: grep -w bug (with some locale) 
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         91909
>Category:       gnu
>Synopsis:       grep(1): grep -w bug (with some locales)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    linimon
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan 17 15:00:16 GMT 2006
>Closed-Date:    Fri Mar 09 00:43:13 GMT 2007
>Last-Modified:  Fri Mar 09 00:43:13 GMT 2007
>Originator:     Yoshiaki Uchikawa
>Release:        FreeBSD 7.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD singer.tertio.atoll 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Fri Dec 23 19:56:43 JST 2005 yoshiaki@singer.tertio.atoll:/usr/src/sys/i386/compile/CRUSEv6 i386

FreeBSD outsider.tertio.atoll 6.0-STABLE FreeBSD 6.0-STABLE #0: Mon Jan  9 23:32:03 JST 2006     root@outsider.tertio.atoll:/usr/src/sys/i386/compile/OUTSIDER  i386

>Description:
  Probably multi-byte support of grep has broken with -w option(word match).

  %echo elisp foo lisp | env LANG=C grep -w lisp
  elisp foo lisp
  %echo elisp foo lisp | env LANG=ja_JP.eucJP grep -w lisp
  %echo elisp foo lisp | env LANG=ja_JP.SJIS grep -w lisp
  %echo elisp foo lisp | env LANG=zh_TW.Big5 grep -w lisp
  %echo elisp foo lisp | env LANG=zh_CN.GB2312 grep -w lisp
  %echo elisp foo lisp | env LANG=ko_KR.eucKR grep -w lisp

  For this reason, ports of a lisp category cannot be build.

  % setenv LANG ; cd /usr/ports/lang/sbcl
  % make
  sbcl-0.9.8: Makefile error: category lisp not in list of valid categories.
  *** Error code 1

>How-To-Repeat:
 It is as having written above.

>Fix:
I repealed multi-byte support.
And I can build ports of lisp category.
 
--- search.c.orig       Sun Jan 15 00:09:38 2006
+++ search.c    Tue Jan 17 23:55:48 2006
@@ -520,7 +520,8 @@
                    else
                      {
                        assert (start > 0);
-#ifdef MBS_SUPPORT
+/* #ifdef MBS_SUPPORT */
+#if 0
                        if (mb_cur_max > 1)
                          {
                            const char *s;
@@ -560,7 +561,8 @@
                          rword_match = 1;
                        else
                          {
-#ifdef MBS_SUPPORT
+/* #ifdef MBS_SUPPORT */
+#if 0
                            if (mb_cur_max > 1)
                              {
                                wchar_t nwc;


>Release-Note:
>Audit-Trail:

From: Yoshiaki Uchikawa <yoshiaki@kt.rim.or.jp>
To: bug-followup@FreeBSD.org, yoshiaki@kt.rim.or.jp
Cc:  
Subject: Re: gnu/91909: grep -w bug (with some locale) 
Date: Thu, 19 Jan 2006 00:06:44 +0900 (JST)

 >  % setenv LANG ; cd /usr/ports/lang/sbcl
 >  % make
 >  sbcl-0.9.8: Makefile error: category lisp not in list of valid categories.
 >  *** Error code 1
 
 This is a type mistake, it is corrected below.
 
   % setenv LANG ja_JP.eucJP ; cd /usr/ports/lang/sbcl
   % make
   sbcl-0.9.8: Makefile error: category lisp not in list of valid categories.
   *** Error code 1
 --
 UCHIKAWA yoshiaki
State-Changed-From-To: open->patched 
State-Changed-By: tjr 
State-Changed-When: Fri Feb 24 11:56:46 UTC 2006 
State-Changed-Why:  
Fixed in -CURRENT; awaiting MFC. 


Responsible-Changed-From-To: freebsd-bugs->tjr 
Responsible-Changed-By: tjr 
Responsible-Changed-When: Fri Feb 24 11:56:46 UTC 2006 
Responsible-Changed-Why:  
I'll handle this one. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=91909 
State-Changed-From-To: patched->closed 
State-Changed-By: linimon 
State-Changed-When: Fri Mar 9 00:42:01 UTC 2007 
State-Changed-Why:  
MFC done Tue Mar 21 20:51:35 2006 UTC. 


Responsible-Changed-From-To: tjr->linimon 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Fri Mar 9 00:42:01 UTC 2007 
Responsible-Changed-Why:  

http://www.freebsd.org/cgi/query-pr.cgi?pr=91909 
>Unformatted:
