From e68cfecc91af25d9d76caa7857bf6770eb83bdf4 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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cgi.c') 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 * Copyright (c) 2014, 2015, 2016 Ingo Schwarze @@ -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 v1.2.3-56-ge451