diff -r a6c18628dff1 -r 344fd1fe237b mercurial/hgweb/hgweb_mod.py --- a/mercurial/hgweb/hgweb_mod.py Fri Jun 30 03:45:43 2017 +0200 +++ b/mercurial/hgweb/hgweb_mod.py Fri Jun 30 03:45:44 2017 +0200 @@ -320,7 +320,7 @@ rctx = requestcontext(self, repo) # This state is global across all threads. - encoding.encoding = rctx.config('web', 'encoding', encoding.encoding) + encoding.encoding = rctx.config('web', 'encoding') rctx.repo.ui.environ = req.env if rctx.csp: