linux_dsm_epyc7002/Documentation/sphinx
Jani Nikula 86c0f046a8 Documentation/sphinx: fix kernel-doc decode for non-utf-8 locale
On python3, Popen() universal_newlines=True converts the subprocess
stdout to unicode text using a codec based on user preferences. Given
LANG indicating ascii and utf-8 stdout from the subprocess, you'd get:

WARNING: kernel-doc '../scripts/kernel-doc -rst -enable-lineno
../drivers/media/dvb-core/demux.h' processing failed with: 'ascii' codec can't
decode byte 0xe2 in position 6368: ordinal not in range(128)

Fix this by dropping universal_newlines=True and replacing the implicit
LANG specific decode with an explicit utf-8 decode. This also gets rid
of the annoying conditional code for python 2 vs. 3.

Fixes: ba35018593 ("Documentation/sphinx: fix kernel-doc extension on python3")
Reference: http://mid.mail-archive.com/54c23e8e-89c0-5cea-0dcc-e938952c5642@infradead.org
Reported-and-tested-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2017-08-31 13:36:28 -06:00
..
cdomain.py Use sphinx.version_info directly instead of parsing 2017-03-31 09:19:37 -06:00
kernel_include.py docs: sphinx-extensions: add metadata parallel-safe 2016-09-01 08:19:02 -06:00
kerneldoc.py Documentation/sphinx: fix kernel-doc decode for non-utf-8 locale 2017-08-31 13:36:28 -06:00
kfigure.py docs-rst: automatically convert Graphviz and SVG images 2017-03-09 02:59:26 -07:00
load_config.py doc-rst: generic way to build only sphinx sub-folders 2016-08-14 11:51:51 -06:00
parse-headers.pl docs-rst: parse-headers.pl: cleanup the documentation 2016-11-30 17:08:09 -07:00
requirements.txt sphinx-pre-install: use a requirements file 2017-07-23 15:51:24 -06:00
rstFlatTable.py docs: sphinx-extensions: make rstFlatTable work with docutils 0.13 2016-12-18 13:30:29 -07:00