stagit-gopher

static git page generator for gopher
git clone git://git.2f30.org/stagit-gopher.git
Log | Files | Refs | README | LICENSE

commit e6c36b0eb1f0af8fd93eced69c48c271f21f6a12
parent 1d747ca19f3afe0f7b61575a06fa9b37d4384eeb
Author: Quentin Rameau <quinq@fifth.space>
Date:   Sun Jun 25 23:00:14 +0200

Help glibc deal with UTF-8 by setting locale.

Diffstat:
stagit-gopher.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/stagit-gopher.c b/stagit-gopher.c @@ -5,6 +5,7 @@ #include <inttypes.h> #include <libgen.h> #include <limits.h> +#include <locale.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -1080,6 +1081,8 @@ main(int argc, char *argv[]) if (pledge("stdio rpath wpath cpath", NULL) == -1) err(1, "pledge"); + setlocale(LC_CTYPE, ""); + for (i = 1; i < argc; i++) { if (argv[i][0] != '-') { if (repodir)