commit 727f795e946818fabcded91e83d75f3d5b1fc1f8
Author:     Mattias Andrée <[email protected]>
AuthorDate: Wed Mar 30 18:58:26 2016 +0200
Commit:     sin <[email protected]>
CommitDate: Wed Apr 20 22:57:40 2016 +0100

    grep: fix UTF-8 support
    
    Signed-off-by: Mattias Andrée <[email protected]>

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 @@ main(int argc, char *argv[])
        FILE *fp;
        char *arg;
 
+       setlocale(LC_ALL, "");
+
        SLIST_INIT(&phead);
 
        ARGBEGIN {

Reply via email to