Fix SF bug #1072182, problems with signed characters.

Most of these can be backported.
diff --git a/Python/ast.c b/Python/ast.c
index dde0d04..93334dc 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -2879,7 +2879,7 @@
 parsestr(const char *s, const char *encoding)
 {
 	size_t len;
-	int quote = *s;
+	int quote = Py_CHARMASK(*s);
 	int rawmode = 0;
 	int need_encoding;
 	int unicode = 0;