doc: Fix encoding problem
Depending on the version of Python 3 the user has installed, 'open' may default to using 'ascii' encoding. Since the documentation is in UTF-8, and contains characters beyond 'ascii', this will result in failures when using these versions of Python. Fix this by being explicit about the encoding to be used when reading these files. Signed-off-by: David Brown <david.brown@linaro.org> Change-Id: I54c69334c6bf377f1135cec04f4e0ea96a8e9a5b
This commit is contained in:
parent
98d4836105
commit
53266a3836
1 changed files with 1 additions and 1 deletions
|
@ -38,7 +38,7 @@ def get_rst_files(dir):
|
|||
|
||||
shutil.copyfile(file, os.path.join(ZEPHYR_BASE, "doc", frel))
|
||||
|
||||
with open(file) as f:
|
||||
with open(file, encoding="utf-8") as f:
|
||||
content = f.readlines()
|
||||
content = [x.strip() for x in content]
|
||||
directives = "|".join(DIRECTIVES)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue