[Zope] ZopeLDAP and unicode problem
Adam Szpakowski
worf@optics.polsl.gliwice.pl
Sun, 20 Apr 2003 00:01:52 +0200
Hi,
I have strange problem in combination of Zope, LDAP server and ZopeLDAP
product. In LDAP the entries are held in unicode (utf8). And those entries
using some PHP script can be converted to iso8859-2. So on server side
everything is ok.
But when I'm querying those entries in Zope the result is buggy. The national
characters (polish in my case) are converted to something strange.
I'm working on linux, Zope 2.6.1 and dummy codecs.lookup set to 'iso-8859-2'
in z2.py.
I've also tried something like this:
<dtml-in usersShow_proceed>
<tr>
<td><dtml-var expr="_.unicode(givenName)"></td>
<td><dtml-var _.unicode(sn)"></td>
<td><dtml-var expr="_.unicode(cn)"></td>
</tr>
</dtml-in>
Effect is the same.
When tryin something like this:
<dtml-var expr="_.unicode(givenName,'iso8859-2')">
I've got:
Error Type: TypeError
Error Value: coercing to Unicode: need string or buffer, instance found
Has anybody idea what is wrong in my procedure?
Bests Regards
--
Adam Szpakowski
Silesian University of Technology - Institute of Physics
Department of Optoelectronic
e-mail: worf@optics.polsl.gliwice.pl