+2002-09-03 Yuuichi Teranishi <teranisi@gohome.org>
+
+ * pldap.el (ldap-decode-string): Return string as-is if
+ `ldap-coding-system' is nil.
+ (ldap-encode-string): Ditto.
+ (ldap-search-entries): Encode filter string with `ldap-encode-string'.
+
2002-08-21 Yuuichi Teranishi <teranisi@gohome.org>
* elmo-util.el (elmo-warning): Define as a macro which uses
(defun ldap-decode-string (str)
"Decode LDAP STR."
- (if (fboundp 'decode-coding-string)
- (decode-coding-string str ldap-coding-system)))
+ (if (and (fboundp 'decode-coding-string)
+ ldap-coding-system)
+ (decode-coding-string str ldap-coding-system)
+ str))
(defun ldap-encode-string (str)
"Encode LDAP STR."
- (if (fboundp 'encode-coding-string)
- (encode-coding-string str ldap-coding-system)))
+ (if (and (fboundp 'encode-coding-string)
+ ldap-coding-system)
+ (encode-coding-string str ldap-coding-system)
+ str))
(defun ldap-decode-address (str)
"Decode LDAP address STR."
(setq ldap (ldap-open host host-plist))
(if ldap-verbose
(message "Searching with LDAP on %s..." host))
- (setq result (ldap-search ldap filter
+ (setq result (ldap-search ldap (ldap-encode-string filter)
(plist-get host-plist 'base)
(plist-get host-plist 'scope)
attributes attrsonly withdn