aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/cgi.c
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
commite68cfecc91af25d9d76caa7857bf6770eb83bdf4 (patch)
treeea4e81a88f72dbed0f354234d78732160771450a /cgi.c
parent89a1a1be54eefe77cc04401526ea22323c644115 (diff)
downloadmandoc-e68cfecc91af25d9d76caa7857bf6770eb83bdf4.tar.gz
mandoc-e68cfecc91af25d9d76caa7857bf6770eb83bdf4.tar.zst
mandoc-e68cfecc91af25d9d76caa7857bf6770eb83bdf4.zip
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@.
Diffstat (limited to 'cgi.c')
-rw-r--r--cgi.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/cgi.c b/cgi.c
index f8497b58..6643b35d 100644
--- a/cgi.c
+++ b/cgi.c
@@ -1,4 +1,4 @@
-/* $Id: cgi.c,v 1.135 2016/07/11 22:48:37 schwarze Exp $ */
+/* $Id: cgi.c,v 1.136 2016/07/31 23:37:23 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014, 2015, 2016 Ingo Schwarze <schwarze@usta.de>
@@ -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);