Fix UnicodeDecodeError by specifying UTF-8 encoding when opening files
Description
This pull request addresses the UnicodeDecodeError encountered on Windows 11 when reading files with the default system encoding (cp1252). By specifying UTF-8 encoding explicitly, we ensure that the file can be read correctly, preventing the decode error.
Besides these issue, i've removed unnecessary comments and lines from the method
Changes Made
Updated compileTemplate method in compile.py to specify encoding='utf-8' when opening files.
Tests
Tested locally and verified that the error is resolved.
Fix UnicodeDecodeError by specifying UTF-8 encoding when opening files
Description
This pull request addresses the
UnicodeDecodeError
encountered on Windows 11 when reading files with the default system encoding (cp1252). By specifying UTF-8 encoding explicitly, we ensure that the file can be read correctly, preventing the decode error.Besides these issue, i've removed unnecessary comments and lines from the method
Changes Made
compileTemplate
method incompile.py
to specifyencoding='utf-8'
when opening files.Tests
Tested locally and verified that the error is resolved.