Index: Parser/tokenizer.c =================================================================== --- Parser/tokenizer.c (revision 65732) +++ Parser/tokenizer.c (working copy) @@ -274,10 +274,9 @@ tok->read_coding_spec = 1; if (tok->encoding == NULL) { assert(tok->decoding_state == STATE_RAW); - if (strcmp(cs, "utf-8") == 0 || - strcmp(cs, "iso-8859-1") == 0) { + if (strcmp(cs, "utf-8") == 0) tok->encoding = cs; - } else { + else { r = set_readline(tok, cs); if (r) { tok->encoding = cs; @@ -286,7 +285,8 @@ else PyMem_FREE(cs); } - } else { /* then, compare cs with BOM */ + } + else { /* then, compare cs with BOM */ r = (strcmp(tok->encoding, cs) == 0); PyMem_FREE(cs); } Index: Lib/test/test_imp.py =================================================================== --- Lib/test/test_imp.py (revision 65732) +++ Lib/test/test_imp.py (working copy) @@ -41,12 +41,12 @@ def test_find_module_encoding(self): fd = imp.find_module("heapq")[0] - self.assertEqual(fd.encoding, "iso-8859-1") + self.assertEqual(fd.encoding, "utf-8") def test_issue1267(self): fp, filename, info = imp.find_module("pydoc") self.assertNotEqual(fp, None) - self.assertEqual(fp.encoding, "iso-8859-1") + self.assertEqual(fp.encoding, "utf-8") self.assertEqual(fp.tell(), 0) self.assertEqual(fp.readline(), '#!/usr/bin/env python\n') fp.close() Index: Lib/test/test_pep3120.py =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream