Fix Python scripts for Windows: UTF-8 encoding (#485)
authorMaxim Belkin <maxim.belkin@gmail.com>
Tue, 11 Aug 2020 13:03:52 +0000 (08:03 -0500)
committerGitHub <noreply@github.com>
Tue, 11 Aug 2020 13:03:52 +0000 (09:03 -0400)
commit52597a55d57f3c00cefd1a33129b9acceb4cddb5
treefbc984713b47bf80e6018f7b1881ecb72df9c698
parent95221b1df8c1249d51e4c0c6852288fe2b694aa7
Fix Python scripts for Windows: UTF-8 encoding (#485)

To avoid problems with various symbols, we have to specify the encoding
when we read files.
The actual codec name is `utf_8` but aliases like `utf8`, `utf-8`, etc
are accepted. Here, I'm using `utf-8` alias.
https://docs.python.org/3.8/library/codecs.html#standard-encodings

This fixes `make lesson-check` when running under 'Git for Windows' for
lessons that have non-cp1252 characters.
bin/lesson_check.py
bin/util.py
bin/workshop_check.py