commit | 727f795e946818fabcded91e83d75f3d5b1fc1f8 | [log] [tgz] |
---|---|---|
author | Mattias Andrée <maandree@kth.se> | Wed Mar 30 18:58:26 2016 +0200 |
committer | sin <sin@2f30.org> | Wed Apr 20 22:57:40 2016 +0100 |
tree | a59f43c0668776593713e02cb075bc9d589146dc | |
parent | 7250fb69686b4c0131e4cef3904003fb1124851e [diff] |
grep: fix UTF-8 support Signed-off-by: Mattias Andrée <maandree@kth.se>
diff --git a/grep.c b/grep.c index 64ffbe2..22b3b6f 100644 --- a/grep.c +++ b/grep.c
@@ -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 @@ FILE *fp; char *arg; + setlocale(LC_ALL, ""); + SLIST_INIT(&phead); ARGBEGIN {