don't mask encoding errors when decoding a string #6289
diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c
index 1d0a4aa..0f6705d 100644
--- a/Parser/tokenizer.c
+++ b/Parser/tokenizer.c
@@ -619,11 +619,8 @@
 	if (tok->enc != NULL) {
 		assert(utf8 == NULL);
 		utf8 = translate_into_utf8(str, tok->enc);
-		if (utf8 == NULL) {
-			PyErr_Format(PyExc_SyntaxError,
-				"unknown encoding: %s", tok->enc);
+		if (utf8 == NULL)
 			return error_ret(tok);
-		}
 		str = PyString_AsString(utf8);
 	}
 #endif