Re: [hackers] [sbase] Remove locale-cancer from grep(1) || FRIGN

2016-12-27 Thread Laslo Hunhold
On Fri, 29 Apr 2016 12:24:18 +0100
Dimitris Papastamos  wrote:

Hey Dimitris,

> Maintain the workaround locally until we write our own regex
> engine.

I investigated a bit more and maybe we should really think about doing
the "dirty" setlocale in this context.

Cheers

Laslo

-- 
Laslo Hunhold 



Re: [hackers] [sbase] Remove locale-cancer from grep(1) || FRIGN

2016-04-29 Thread Dimitris Papastamos
On Fri, Apr 29, 2016 at 01:19:41PM +0200, Mattias Andrée wrote:
> setlocale(LC_ALL, "");
> 
> is necessary for UTF-8 support in the regex-engine.

Maintain the workaround locally until we write our own regex
engine.



Re: [hackers] [sbase] Remove locale-cancer from grep(1) || FRIGN

2016-04-29 Thread Mattias Andrée
setlocale(LC_ALL, "");

is necessary for UTF-8 support in the regex-engine.

On Fri, 29 Apr 2016 13:16:56 +0200
 wrote:

> commit afc944d9b87e5fbd2bbe43853eb8deb6f813ab0a
> Author: FRIGN 
> AuthorDate: Thu Apr 21 22:20:40 2016 +0200
> Commit: sin 
> 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 
>  #include 
>  #include 
>  #include 
> @@ -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


[hackers] [sbase] Remove locale-cancer from grep(1) || FRIGN

2016-04-29 Thread git
commit afc944d9b87e5fbd2bbe43853eb8deb6f813ab0a
Author: FRIGN 
AuthorDate: Thu Apr 21 22:20:40 2016 +0200
Commit: sin 
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 
 #include 
 #include 
 #include 
@@ -179,8 +178,6 @@ main(int argc, char *argv[])
FILE *fp;
char *arg;
 
-   setlocale(LC_ALL, "");
-
SLIST_INIT(&phead);
 
ARGBEGIN {