Normalize the encoding names for Latin-1 and UTF-8 to
'latin-1' and 'utf-8'.

These are optimized in the Python Unicode implementation
to result in more direct processing, bypassing the codec
registry.

Also see issue11303.
diff --git a/Lib/test/test_pep3120.py b/Lib/test/test_pep3120.py
index 09fedf0..496f8da 100644
--- a/Lib/test/test_pep3120.py
+++ b/Lib/test/test_pep3120.py
@@ -19,8 +19,8 @@
         try:
             import test.badsyntax_pep3120
         except SyntaxError as msg:
-            msg = str(msg)
-            self.assertTrue('UTF-8' in msg or 'utf8' in msg)
+            msg = str(msg).lower()
+            self.assertTrue('utf-8' in msg or 'utf8' in msg)
         else:
             self.fail("expected exception didn't occur")