Thanks Dieter, I got one step further: the PostgreSQL log shows my query with converted HTML entites: LOG: query: select * from xp_name where original_name = 'عامررشيد' As you can see, this is not what I want! But how do I tell Zope to use utf8 encoding for the query? When building the query in Zope, I specified as an argumen "original_name:ustring". However, the actual query in the Z SQL method only allows a type of "string". Am I doing something wrong? Thanks, Glenn On Wed, 2003-05-21 at 14:59, Dieter Maurer wrote:
Glenn R Williams wrote at 2003-5-20 16:42 -0400:
I am trying to set up a simple retrieval of data in my PostgreSQL database. The input (in Arabic) has to be in unicode. I can specify an argument of 'arabic_name:ustring' and that is accepted okay. However, something happens between the submission of the form and the execution of the query in the PostgreSQL backend, and no data is returned.
The unicode string will probably be somehow encoded before it is sent to Postgres. This encoding is probably the wrong one.
I would increase the PostgreSQL log level sufficiently that it logs the queries. Then, I would compare the failing (from Zope) and succeeding (from "psql") queries and determine the correct encoding.
Then, I would explicitely call for this encoding.
Dieter -- Glenn R Williams Ghoti Software
Mathematical theories are the part of science you could continue to do if you woke up tomorrow and discovered the universe was gone.