Issue
Due to a problem I had, all stange symbols such as à, ç... have changed to à or ç (all these no-ascii characters). This is happening every time I save a file in Spyder and I would want to know where can I cahange the encoding to utf-8 (the encoding when saving a file).
Thanks.
Solution
You can set the default encoding to utf by code:
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
This is not recommended by many users, so try changing PYTHONIOENCODING="UTF-8"
in your environment first.
Answered By - SYNEC
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.