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
On day nie 20. kwietnia 2003 00:01, Adam Szpakowski wrote:
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've solved the problem. Unicode conversion mechanism differs in PHP from those from Python and some additional decoding to UTF-8 string in python seems to be a solution. Bests Regards -- Adam Szpakowski Silesian University of Technology - Institute of Physics Department of Optoelectronic e-mail: worf@optics.polsl.gliwice.pl
participants (1)
-
Adam Szpakowski