[Zope] DTML-SQLVAR and Unicode and PostgreSQL
Dieter Maurer
dieter@handshake.de
Wed, 21 May 2003 20:59:14 +0200
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