From: teranisi Date: Tue, 3 Sep 2002 00:00:42 +0000 (+0000) Subject: * pldap.el (ldap-decode-string): Return string as-is if X-Git-Tag: elmo-mark-root~20 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=de647f954e39bf31c0cf29f364a2eaaca256bc96;p=elisp%2Fwanderlust.git * 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'. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index b1c93e6..5f27e8f 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,10 @@ +2002-09-03 Yuuichi Teranishi + + * 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 * elmo-util.el (elmo-warning): Define as a macro which uses diff --git a/elmo/pldap.el b/elmo/pldap.el index 15a955c..b544227 100644 --- a/elmo/pldap.el +++ b/elmo/pldap.el @@ -812,13 +812,17 @@ entry according to the value of WITHDN." (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." @@ -915,7 +919,7 @@ entry according to the value of WITHDN." (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