From 5ce556afa6b71ea3e8cb0f4bd06ab4cbee499ef9 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sun, 31 Jul 2016 23:37:23 +0000 Subject: Some base system pages, for example perl(1), contain non-ASCII characters in their source code, so switch on charset autodetection in the same way as in man(1) itself. Issue reported by Pavan Maddamsetti at gmail dot com on bugs@. --- cgi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cgi.c b/cgi.c index 8ca775cd..2d444325 100644 --- a/cgi.c +++ b/cgi.c @@ -800,7 +800,8 @@ resp_format(const struct req *req, const char *file) } mchars_alloc(); - mp = mparse_alloc(MPARSE_SO, MANDOCLEVEL_BADARG, NULL, req->q.manpath); + mp = mparse_alloc(MPARSE_SO | MPARSE_UTF8 | MPARSE_LATIN1, + MANDOCLEVEL_BADARG, NULL, req->q.manpath); mparse_readfd(mp, fd, file); close(fd); -- cgit