From: <no...@so...> - 2002-11-06 17:08:09
|
Bugs item #634540, was opened at 2002-11-06 18:08 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=116528&aid=634540&group_id=16528 Category: PgSQL Group: None Status: Open Resolution: None Priority: 5 Submitted By: Petter Reinholdtsen (pere) Assigned to: Nobody/Anonymous (nobody) Summary: Unable to insert UTF-8 strings Initial Comment: I'm unable to insert an python UTF-8 string into my UTF-8 PostgreSQL database. This is the error message: Traceback (most recent call last): File "/usit/saruman/bsd-u1/pre/usit/src/cerebrumcvs/cerebrum/Cerebrum/tests/SQLDriverTestCase.py", line 37, in testUTF8Text {'text': u"unicodeTest"}) File "/usit/saruman/bsd-u1/pre/usit/src/cerebrumcvs/cerebrum/Cerebrum/Database.py", line 603, in execute return self._cursor.execute(operation, parameters) File "/usit/saruman/bsd-u1/pre/usit/src/cerebrumcvs/cerebrum/Cerebrum/Database.py", line 184, in execute return self._cursor.execute(sql, *binds) File "/usr/lib/python2.2/site-packages/pyPgSQL/PgSQL.py", line 2590, in execute raise OperationalError, msg OperationalError: ERROR: Unable to locate type name 'u' in catalog This is a fragment from the test code that fails: self.db.execute("CREATE TABLE test_db_utf8 (value CHAR VARYING(128))") self.db.execute("INSERT INTO test_db_utf8 (value) VALUES (:text)", {'text': u"unicodeTest"}) self.db.execute("DROP TABLE test_db_utf8") ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=116528&aid=634540&group_id=16528 |