From f16827bc7fb391bc1ca7faa67fc5de5e273285fe Mon Sep 17 00:00:00 2001 From: Mark Huang Date: Wed, 8 Nov 2006 21:53:50 +0000 Subject: [PATCH] Unicode array elements are always cast to regular Python strings; always cast strings to unicode objects for now --- psycopg2/psycopg/typecast_builtins.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/psycopg2/psycopg/typecast_builtins.c b/psycopg2/psycopg/typecast_builtins.c index 0fc109d8..8532b1f5 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}, -- 2.47.0