Open Nixellion opened 9 months ago
Without specifying "utf-8" encoding when writing a file the script fails to write text to a file in many cases.
I can't say if it's specific to OS region\language or contents of the file, but this simple change fixes any such issues, tested locally.
Add encoding="utf-8" to the file open on write.
encoding="utf-8"
cc/ @klen
A note, same change required for the
def read(self, name): """Read migration from file."""
but it's missing from this PR. I can create another PR with that change if needed
Without specifying "utf-8" encoding when writing a file the script fails to write text to a file in many cases.
I can't say if it's specific to OS region\language or contents of the file, but this simple change fixes any such issues, tested locally.
Changes in this PR
Add
encoding="utf-8"
to the file open on write.cc/ @klen