-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Currently cohesion uses the default encoding for open()
:
cohesion/cohesion/filesystem.py
Lines 10 to 11 in b9add60
with open(filename) as fd: | |
return fd.read() |
This takes the encoding from locale.getpreferredencoding()
, which on my Windows installation is cp1252. So even though my file is saved in UTF-8, cohesion loads it in cp1252, crashing with
UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 9011: character maps to <undefined>
Adding encoding="utf-8"
would solve this issue.
Metadata
Metadata
Assignees
Labels
No labels