Python 3 uses UTF-8 encoding for source-code files by default. Should I still use the encoding declaration at the beginning of every source file? Like # -*- coding: ut
UTF-8
, which is a default.For multi-encodings projects:
If some files are encoded in the
non-utf-8
, then even for these encoded inUTF-8
you should add encoding declaration too, because the golden rule isExplicit is better than implicit.
configuring encoding for specific file in pycharm
# vim: set fileencoding=
: