In Python 3, the default encoding is UTF-8, so you no longer need to set it explicitly. However, there is no way to "globally" set the source encoding by default, and history has shown that such global parameters, as a rule, are a bad idea. (For example, the -U and -Q options for Python and sys.setdefaultencoding () returned when we had this.) You do not control (directly) the entire source that is imported into your program, since it includes a standard library and any third-party modules which you use directly or indirectly.
, Unicode, . , , UTF-8, , , ASCII unicode (, u'spæm'), . -unicode- ('spam' "spam") unicode, .