I'm using python3 in pycharm but it seems that pycharm doesn't take utf8 as default encoding method.
For example, I try to open with out setting encoding parameter and print a line
with open('/Users/test.txt','r') as file:
print(file.readline())
and then I got
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe8 in position 0: ordinal not in range(128)
While I can open the file without setting the 'encoding' parameter in iterm2 and Jupyter notebook. So I guess it is due to the encoding setting in pycharm, and I have tried every encoding setting in pycharm it also didn't work.