[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patch #6027] Fix 's' when using single byte string

From: Flavio
Subject: [patch #6027] Fix 's' when using single byte string
Date: Tue, 19 Jun 2007 03:04:25 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20061115 Ubuntu/dapper-security Firefox/


                 Summary: Fix '\s' when using single byte string
                 Project: grep
            Submitted by: fleitner
            Submitted on: Tuesday 06/19/2007 at 03:04
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any




When using multibyte string egrep uses re_compile() and re_search()
from glibc to deal with regex and glibc accepts '\s' as equivalent
to '[:blank:]'.

When using single byte string egrep uses dfacomp() and dfaexec()
which does not implement '\s'.

How to reproduce it:
$ echo "     root=/dev/sda" > /tmp/input
$ LANG=en_US.UTF8 grep -E "^\s*root" /tmp/input
$ LANG=C grep -E "^\s*root" /tmp/input

Attached a patch to implement '\s' handler.

-Flavio Leitner


File Attachments:

Date: Tuesday 06/19/2007 at 03:04  Name:
grep-cvs-add-backslash-s-support.patch  Size: 1kB   By: fleitner



Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]