diff options
author | 2016-07-31 23:35:26 +0000 | |
---|---|---|
committer | 2016-07-31 23:35:26 +0000 | |
commit | f139d5f6d02a578b8057d7624901c2cc37c78adb (patch) | |
tree | c063daf8c3d67fe16bf8e1c7e3f75e362e290fef /usr.bin/mandoc/cgi.c | |
parent | Remove devmap stuff which is unused on armv7. (diff) | |
download | wireguard-openbsd-f139d5f6d02a578b8057d7624901c2cc37c78adb.tar.xz wireguard-openbsd-f139d5f6d02a578b8057d7624901c2cc37c78adb.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 'usr.bin/mandoc/cgi.c')
-rw-r--r-- | usr.bin/mandoc/cgi.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/mandoc/cgi.c b/usr.bin/mandoc/cgi.c index 79b42e6add4..19d15700910 100644 --- a/usr.bin/mandoc/cgi.c +++ b/usr.bin/mandoc/cgi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cgi.c,v 1.74 2016/07/11 22:46:57 schwarze Exp $ */ +/* $OpenBSD: cgi.c,v 1.75 2016/07/31 23:35:26 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2014, 2015, 2016 Ingo Schwarze <schwarze@usta.de> @@ -798,7 +798,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); |