From: Alain S. <asp...@gm...> - 2007-05-23 17:16:05
|
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 |