Mod to previous checkin: we must require ascii, not system defautl encoding,
because we have no easy way to convert the python encoding string to
a CF encoding parameter.
diff --git a/Mac/Modules/cf/pycfbridge.c b/Mac/Modules/cf/pycfbridge.c
index d4466ac..21a9522 100644
--- a/Mac/Modules/cf/pycfbridge.c
+++ b/Mac/Modules/cf/pycfbridge.c
@@ -292,7 +292,7 @@
UniChar *unichars;
if (PyString_Check(src)) {
- if (!PyArg_Parse(src, "es", NULL, &chars))
+ if (!PyArg_Parse(src, "es", "ascii", &chars))
return NULL; /* This error is more descriptive than the general one below */
*dst = CFStringCreateWithCString((CFAllocatorRef)NULL, chars, kCFStringEncodingASCII);
return 1;