My windows display language was Simplified Chinese before, and that cause trouble.
When I input markdown file(usually encoding by utf-8), the application use the system default character set, in my case, GBK, causing error.
I switch my display language to English(US) and change default encoding method to utf-8 to solve this, but it's not convenient. I suggest that a function enabling manually choosing .md file's character set could be added.
The error is SIMILAR(not original cause I already switch language and cannot recurrent the error again):
......
File "C:\Python\Python37\lib\pathlib.py", line 1222, in read_text
return f.read()
UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 118: illegal multibyte sequence
test.md
Try this. I noticed that it worked well under my current English-as-the-display-language environment. I guess it will probably go wrong again when switching back to Simplified Chinese or whatever else language.
My windows display language was Simplified Chinese before, and that cause trouble. When I input markdown file(usually encoding by utf-8), the application use the system default character set, in my case, GBK, causing error. I switch my display language to English(US) and change default encoding method to utf-8 to solve this, but it's not convenient. I suggest that a function enabling manually choosing .md file's character set could be added.
The error is SIMILAR(not original cause I already switch language and cannot recurrent the error again):
...... File "C:\Python\Python37\lib\pathlib.py", line 1222, in read_text return f.read() UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 118: illegal multibyte sequence