I've installed zope2.7 and zope-psycopgda on Debian Sarge. (The official deb 
packages.) According to the ZopeBook 2.6 Relational Database Connectivity 
chapter a Psycopg_database_connection and 2 Z SQL methods were added to a test 
folder. The select query works without any problems, and The insert into works 
fine till I try to insert a string containing a character encoding over 127. I 
get the following error message:

Error, psycopg.ProgrammingError: ERROR: invalid byte sequence for encoding 
"UNICODE": 0xe16a6f insert into nevek (azon, nev) values( 13, 'Lájos');

In Z SQL method I wrote the following:

insert into nevek (azon, nev) values(
<dtml-sqlvar azon type="int">,
<dtml-sqlvar nev type="string">);

(azon=id, nev=name)
The postgres database is unicode encoded. What shall I do in order to insert 
these texts into database via zope? (with psql I can insert it smoothly.)


Miert fizetsz az internetert? Korlatlan, ingyenes internet hozzaferes a 
Probald ki most! http://www.freestart.hu
Zope-DB mailing list

Reply via email to