sbase

suckless unix tools
git clone git://git.2f30.org/sbase
Log | Files | Refs | README | LICENSE

commit 727f795e946818fabcded91e83d75f3d5b1fc1f8
parent 7250fb69686b4c0131e4cef3904003fb1124851e
Author: Mattias Andrée <maandree@kth.se>
Date:   Wed, 30 Mar 2016 18:58:26 +0200

grep: fix UTF-8 support

Signed-off-by: Mattias Andrée <maandree@kth.se>

Diffstat:
Mgrep.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git 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 {