airtai / nbdev-mkdocs

Extension to nbdev for generating docs with Material for Mkdocs
https://nbdev-mkdocs.airt.ai
Apache License 2.0
17 stars 2 forks source link

Open notebooks with explicit utf-8 encoding #193

Closed kumaranvpl closed 1 year ago

kumaranvpl commented 1 year ago

Currently nbdev_mkdocs fails for few notebooks on Windows. The reason is by default windows uses charmap encoding which is different from utf-8. Please use explicit utf-8 encoding at following places https://github.com/airtai/nbdev-mkdocs/blob/d983d1a14d1f7a2de93dc2131254f59b5b5b58ab/nbdev_mkdocs/mkdocs.py#L433 https://github.com/airtai/nbdev-mkdocs/blob/d983d1a14d1f7a2de93dc2131254f59b5b5b58ab/nbdev_mkdocs/mkdocs.py#L436 https://github.com/airtai/nbdev-mkdocs/blob/d983d1a14d1f7a2de93dc2131254f59b5b5b58ab/nbdev_mkdocs/_helpers/quarto_to_mkdocs.py#L206 https://github.com/airtai/nbdev-mkdocs/blob/d983d1a14d1f7a2de93dc2131254f59b5b5b58ab/nbdev_mkdocs/_helpers/quarto_to_mkdocs.py#L214

Also add windows to CI