GNU bug report logs - #30681
What characters are in [[:space:]]?

Previous Next

Package: grep;

Reported by: Peng Yu <pengyu.ut <at> gmail.com>

Date: Fri, 2 Mar 2018 17:24:02 UTC

Severity: normal

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Jim Meyering <jim <at> meyering.net>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#30681: closed (What characters are in [[:space:]]?)
Date: Fri, 02 Mar 2018 23:20:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Fri, 2 Mar 2018 15:19:08 -0800
with message-id <CA+8g5KEVsMrr0gNVi_wfPt_dnXcrtZWDH3F-HhA9Gr1r_bd9AQ <at> mail.gmail.com>
and subject line Re: bug#30681: What characters are in [[:space:]]?
has caused the debbugs.gnu.org bug report #30681,
regarding What characters are in [[:space:]]?
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
30681: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=30681
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Peng Yu <pengyu.ut <at> gmail.com>
To: bug-grep <at> gnu.org
Subject: What characters are in [[:space:]]?
Date: Fri, 2 Mar 2018 11:23:22 -0600
Hi,

[[:space:]] includes the following unicode character.
http://www.fileformat.info/info/unicode/char/00a0/index.htm

$ echo 'a b' | grep 'a[[:space:]]b'
a b
$ echo 'a b'|xxd
00000000: 61c2 a062 0a                             a..b.

Where is this info documented for grep?

Are these all the possible white space characters?

http://jkorpela.fi/chars/spaces.html

-- 
Regards,
Peng


[Message part 3 (message/rfc822, inline)]
From: Jim Meyering <jim <at> meyering.net>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 30681-done <at> debbugs.gnu.org, Peng Yu <pengyu.ut <at> gmail.com>
Subject: Re: bug#30681: What characters are in [[:space:]]?
Date: Fri, 2 Mar 2018 15:19:08 -0800
tags 30681 notabug
stop

On Fri, Mar 2, 2018 at 2:32 PM, Paul Eggert <eggert <at> cs.ucla.edu> wrote:
> On 03/02/2018 09:23 AM, Peng Yu wrote:
>>
>> Where is this info documented for grep?
>
> It's not documented for grep because it's not part of grep. It's part of
> your locale.

You can check for yourself.
In every one of the 818 locales installed on a Fedora 27 system, I see
the same five bytes:

$ perl -e 'print pack ("C*", 0..255);'|grep -ao '[[:space:]]'|tr -d
'\n' |od -ac -An
  ht  vt  ff  cr  sp
  \t  \v  \f  \r


This bug report was last modified 7 years and 174 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.