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
1 changed files with 3 additions and 0 deletions

3
grep.c
View File

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