1
0
mirror of git://git.suckless.org/sbase synced 2024-12-23 07:25:07 +00:00

grep: fix UTF-8 support

Signed-off-by: Mattias Andrée <maandree@kth.se>
This commit is contained in:
Mattias Andrée 2016-03-30 18:58:26 +02:00 committed by sin
parent 7250fb6968
commit 727f795e94

3
grep.c
View File

@ -1,4 +1,5 @@
/* See LICENSE file for copyright and license details. */ /* See LICENSE file for copyright and license details. */
#include <locale.h>
#include <regex.h> #include <regex.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
@ -178,6 +179,8 @@ main(int argc, char *argv[])
FILE *fp; FILE *fp;
char *arg; char *arg;
setlocale(LC_ALL, "");
SLIST_INIT(&phead); SLIST_INIT(&phead);
ARGBEGIN { ARGBEGIN {