summaryrefslogtreecommitdiff
path: root/Python/codecs.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-05-16 14:46:20 +0200
committerVictor Stinner <victor.stinner@gmail.com>2014-05-16 14:46:20 +0200
commit569a55317259d71ebde1c85ef48874eba3824a5e (patch)
tree6084ff6eb32b01d7657af248d656f2f5579e76cf /Python/codecs.c
parentd390adb5bc43e2cb4ee70aa1b4fbded05932bc74 (diff)
downloadcpython-569a55317259d71ebde1c85ef48874eba3824a5e.tar.gz
Issue #13916: Fix surrogatepass error handler on Windows
Diffstat (limited to 'Python/codecs.c')
-rw-r--r--Python/codecs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Python/codecs.c b/Python/codecs.c
index 700313633e..4c2ae381b3 100644
--- a/Python/codecs.c
+++ b/Python/codecs.c
@@ -960,6 +960,10 @@ get_standard_encoding(const char *encoding, int *bytelength)
}
}
}
+ else if (strcmp(encoding, "CP_UTF8") == 0) {
+ *bytelength = 3;
+ return ENC_UTF8;
+ }
return ENC_UNKNOWN;
}