setlocale(LC_ALL, ""); is necessary for UTF-8 support in the regex-engine.
On Fri, 29 Apr 2016 13:16:56 +0200 <[email protected]> wrote: > commit afc944d9b87e5fbd2bbe43853eb8deb6f813ab0a > Author: FRIGN <[email protected]> > AuthorDate: Thu Apr 21 22:20:40 2016 +0200 > Commit: sin <[email protected]> > CommitDate: Fri Apr 29 12:16:51 2016 +0100 > > Remove locale-cancer from grep(1) > > What in the actual fuck? Check the ml history on why > we won't use locale() functions in this context. > > diff --git a/grep.c b/grep.c > index 22b3b6f..64ffbe2 100644 > --- a/grep.c > +++ b/grep.c > @@ -1,5 +1,4 @@ > /* See LICENSE file for copyright and license details. */ > -#include <locale.h> > #include <regex.h> > #include <stdio.h> > #include <stdlib.h> > @@ -179,8 +178,6 @@ main(int argc, char *argv[]) > FILE *fp; > char *arg; > > - setlocale(LC_ALL, ""); > - > SLIST_INIT(&phead); > > ARGBEGIN { >
pgpUtU_SUnGvV.pgp
Description: OpenPGP digital signature
