From: Mark Huang Date: Wed, 8 Nov 2006 21:53:50 +0000 (+0000) Subject: Unicode array elements are always cast to regular Python strings; always cast strings... X-Git-Tag: pycurl-7_13_1~366 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=f16827bc7fb391bc1ca7faa67fc5de5e273285fe;p=plcapi.git Unicode array elements are always cast to regular Python strings; always cast strings to unicode objects for now --- diff --git a/psycopg2/psycopg/typecast_builtins.c b/psycopg2/psycopg/typecast_builtins.c index 0fc109d..8532b1f 100644 --- a/psycopg2/psycopg/typecast_builtins.c +++ b/psycopg2/psycopg/typecast_builtins.c @@ -34,7 +34,9 @@ typecastObject_initlist typecast_builtins[] = { {"FLOAT", typecast_FLOAT_types, typecast_FLOAT_cast, NULL}, {"DECIMAL", typecast_DECIMAL_types, typecast_DECIMAL_cast, NULL}, {"UNICODE", typecast_UNICODE_types, typecast_UNICODE_cast, NULL}, - {"STRING", typecast_STRING_types, typecast_STRING_cast, NULL}, + /* XXX Unicode array elements are always cast to regular Python strings */ + /* {"STRING", typecast_STRING_types, typecast_STRING_cast, NULL}, */ + {"STRING", typecast_STRING_types, typecast_UNICODE_cast, NULL}, {"BOOLEAN", typecast_BOOLEAN_types, typecast_BOOLEAN_cast, NULL}, {"DATETIME", typecast_DATETIME_types, typecast_DATETIME_cast, NULL}, {"TIME", typecast_TIME_types, typecast_TIME_cast, NULL},