setlocale(LC_ALL, "");
is necessary for UTF-8 support in the regex-engine.
On Fri, 29 Apr 2016 13:16:56 +0200
<git_AT_suckless.org> wrote:
> commit afc944d9b87e5fbd2bbe43853eb8deb6f813ab0a
> Author: FRIGN <dev_AT_frign.de>
> AuthorDate: Thu Apr 21 22:20:40 2016 +0200
> Commit: sin <sin_AT_2f30.org>
> 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
> _AT_@ -1,5 +1,4 @@
> /* See LICENSE file for copyright and license details. */
> -#include <locale.h>
> #include <regex.h>
> #include <stdio.h>
> #include <stdlib.h>
> _AT_@ -179,8 +178,6 @@ main(int argc, char *argv[])
> FILE *fp;
> char *arg;
>
> - setlocale(LC_ALL, "");
> -
> SLIST_INIT(&phead);
>
> ARGBEGIN {
>
Received on Fri Apr 29 2016 - 13:19:41 CEST