You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running djhtml on Windows 11 for my project, it fails with Error: 'charmap' codec can't decode byte 0x8f in position 622: character maps to <undefined>. According to various sources (e.g. https://stackoverflow.com/a/68650013) this is due to Windows using an outdated encoding (windows-1252) by default if no encoding is specified when opening the file. This encoding fails to read utf-8 characters. Adding encoding="utf-8" to the open() call in https://github.com/rtts/djhtml/blob/main/djhtml/__main__.py#L53 solves the problem for me.
The text was updated successfully, but these errors were encountered:
If this can also be fixed by adding encoding="utf-8" to the open() call, that seems like a better solution and that paragraph can be removed. Can anyone concur? Or may some people still have valid reasons to not use UTF-8 in 2024?
When running djhtml on Windows 11 for my project, it fails with
Error: 'charmap' codec can't decode byte 0x8f in position 622: character maps to <undefined>
. According to various sources (e.g. https://stackoverflow.com/a/68650013) this is due to Windows using an outdated encoding (windows-1252) by default if no encoding is specified when opening the file. This encoding fails to read utf-8 characters. Addingencoding="utf-8"
to the open() call in https://github.com/rtts/djhtml/blob/main/djhtml/__main__.py#L53 solves the problem for me.The text was updated successfully, but these errors were encountered: