diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2016-07-31 23:37:23 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2016-07-31 23:37:23 +0000 |
commit | e68cfecc91af25d9d76caa7857bf6770eb83bdf4 (patch) | |
tree | ea4e81a88f72dbed0f354234d78732160771450a /cgi.c | |
parent | 89a1a1be54eefe77cc04401526ea22323c644115 (diff) | |
download | mandoc-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.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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); |