d2l-ai / d2l-book

Books with Jupyter notebooks
https://book.d2l.ai/
Apache License 2.0
230 stars 98 forks source link

Windows compatibility issues on file encoding and shell commands #42

Open garylavayou opened 2 years ago

garylavayou commented 2 years ago

Multiple modules including sphinx.py, config.py, and build.py do not explicitly set the encoding='utf-8' option for Python open() function. As a result, the default encoding is gbk on Windows, but the file encoding is utf-8, thus resulting in

UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 884

In addition, the build script uses Linux shell commands such as, rm, cp, etc. As there are no equivalent commands in Windows shell, the script cannot be run on Windows.

Future updates might address the aforementioned issues in order to support d2lbook to run on Windows.

AnirudhDagar commented 2 years ago

@garylavayou we most probably have no plans to support windows in the near future. Feel free to send a PR if you'd like to add that or edit your own fork if that works for you. Thanks!