(ldap-search-entries): Enclosed decoding function with
authorteranisi <teranisi>
Thu, 15 Jun 2000 10:52:01 +0000 (10:52 +0000)
committerteranisi <teranisi>
Thu, 15 Jun 2000 10:52:01 +0000 (10:52 +0000)
`with-temp-buffer' and set as unibyte.
(ldap-search-basic): Set process buffer as unibyte.

elmo/ChangeLog
elmo/pldap.el

index 65e3062..8f994b3 100644 (file)
@@ -6,6 +6,9 @@
        (ldap-encode-attribute): New function.
        (ldap-add-entries): Use it.
        (ldap-modify-entries): Ditto.
+       (ldap-search-entries): Enclosed decoding function with
+       `with-temp-buffer' and set as unibyte.
+       (ldap-search-basic): Set process buffer as unibyte.
 
        * elmo-util.el (elmo-folder-identical-system-p):
        Eliminated name space checking.
index ad3bb98..617fd8a 100644 (file)
@@ -641,6 +641,7 @@ entry according to the value of WITHDN."
             (not (equal "" sizelimit)))
        (setq arglist (nconc arglist (list (format "-z%s" sizelimit)))))
     (with-temp-buffer
+      (set-buffer-multibyte nil)
       (setq ret (apply 'call-process
                       ldap-search-program
                       nil (current-buffer) t
@@ -852,12 +853,14 @@ entry according to the value of WITHDN."
                              attributes attrsonly withdn
                              ldap-verbose))
     (ldap-close ldap)
-    (if ldap-ignore-attribute-codings
-       result
-      (mapcar (function
-              (lambda (record)
-                (mapcar 'ldap-decode-attribute record)))
-             result))))
+    (with-temp-buffer
+      (set-buffer-multibyte nil)  
+      (if ldap-ignore-attribute-codings
+         result
+       (mapcar (function
+                (lambda (record)
+                  (mapcar 'ldap-decode-attribute record)))
+               result)))))
 
 (defun ldap-add-entries (entries &optional host binddn passwd)
   "Add entries to an LDAP directory.