Currently cohesion uses the default encoding for open():
|
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.
Currently cohesion uses the default encoding for
open():cohesion/cohesion/filesystem.py
Lines 10 to 11 in b9add60
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 withUnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 9011: character maps to <undefined>Adding
encoding="utf-8"would solve this issue.