From 727f795e946818fabcded91e83d75f3d5b1fc1f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Andr=C3=A9e?= Date: Wed, 30 Mar 2016 18:58:26 +0200 Subject: [PATCH] grep: fix UTF-8 support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- grep.c | 3 +++ 1 file changed, 3 insertions(+) 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 #include #include #include @@ -178,6 +179,8 @@ main(int argc, char *argv[]) FILE *fp; char *arg; + setlocale(LC_ALL, ""); + SLIST_INIT(&phead); ARGBEGIN {