Use a unicode string as unique_key instead of 8-bit string.
diff --git a/Lib/ctypes/test/test_objects.py b/Lib/ctypes/test/test_objects.py
index 4c7441c..83a8e1b 100644
--- a/Lib/ctypes/test/test_objects.py
+++ b/Lib/ctypes/test/test_objects.py
@@ -22,7 +22,7 @@
 
 >>> array[4] = 'foo bar'
 >>> array._objects
-{s'4': b'foo bar'}
+{'4': b'foo bar'}
 >>> array[4]
 s'foo bar'
 >>>
@@ -47,9 +47,9 @@
 
 >>> x.array[0] = 'spam spam spam'
 >>> x._objects
-{s'0:2': b'spam spam spam'}
+{'0:2': b'spam spam spam'}
 >>> x.array._b_base_._objects
-{s'0:2': b'spam spam spam'}
+{'0:2': b'spam spam spam'}
 >>>
 
 '''
diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c
index e5c1470..bfb0559 100644
--- a/Modules/_ctypes/_ctypes.c
+++ b/Modules/_ctypes/_ctypes.c
@@ -2027,7 +2027,7 @@
 #endif
 		target = target->b_base;
 	}
-	return PyString_FromStringAndSize(string, cp-string);
+	return PyUnicode_FromStringAndSize(string, cp-string);
 }
 
 /*