unicode value
Alain Spineux
aspineux at gmail.com
Wed May 23 19:16:00 CEST 2007
Why does python-ldap not convert automatically any unicode string into
UTF-8 before
to call the raw function ?
Is-it by design or just a lack of time ?
The idea is to replace any argument using this function.
def convert2raw(st):
if isinstance(st, types.UnicodeType)
return st.encode('utf-8')
else
return st
Easy for the filter argument of the "search" function, more work for
structure used
by "modify" and other, but still easy ?
This way we keep compatibility with older code.
Any comment ?
Ops: don't forget to make the the decoding of ldap result :-)
Best regards
--
--
Alain Spineux
aspineux gmail com
May the sources be with you
More information about the python-ldap
mailing list