summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2016-07-31 23:37:23 +0000
committerIngo Schwarze <schwarze@openbsd.org>2016-07-31 23:37:23 +0000
commit5ce556afa6b71ea3e8cb0f4bd06ab4cbee499ef9 (patch)
tree15dadb25c3186413f7eb7dd92ddb3c089a967aaf
parentd4ebaa0831cda5cc57b037351bd6504d3c4d3fff (diff)
downloadmandoc-5ce556afa6b71ea3e8cb0f4bd06ab4cbee499ef9.tar.gz
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@.
-rw-r--r--cgi.c3
1 files changed, 2 insertions, 1 deletions
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);