Mercurial > hg > xemacs-beta
comparison lisp/ldap.el @ 424:11054d720c21 r21-2-20
Import from CVS: tag r21-2-20
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:26:11 +0200 |
parents | da8ed4261e83 |
children |
comparison
equal
deleted
inserted
replaced
423:28d9c139be4c | 424:11054d720c21 |
---|---|
3 ;; Copyright (C) 1997 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1997 Free Software Foundation, Inc. |
4 | 4 |
5 ;; Author: Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch> | 5 ;; Author: Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch> |
6 ;; Maintainer: Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch> | 6 ;; Maintainer: Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch> |
7 ;; Created: Jan 1998 | 7 ;; Created: Jan 1998 |
8 ;; Version: $Revision: 1.7.2.5 $ | 8 ;; Version: $Revision: 1.7.2.6 $ |
9 ;; Keywords: help comm | 9 ;; Keywords: help comm |
10 | 10 |
11 ;; This file is part of XEmacs | 11 ;; This file is part of XEmacs |
12 | 12 |
13 ;; XEmacs is free software; you can redistribute it and/or modify it | 13 ;; XEmacs is free software; you can redistribute it and/or modify it |
153 (defcustom ldap-default-attribute-decoder nil | 153 (defcustom ldap-default-attribute-decoder nil |
154 "*Decoder function to use for attributes whose syntax is unknown." | 154 "*Decoder function to use for attributes whose syntax is unknown." |
155 :type 'symbol | 155 :type 'symbol |
156 :group 'ldap) | 156 :group 'ldap) |
157 | 157 |
158 (defcustom ldap-coding-system (if (featurep 'mule) | 158 (defcustom ldap-coding-system nil |
159 'utf-8 | |
160 nil) | |
161 "*Coding system of LDAP string values. | 159 "*Coding system of LDAP string values. |
162 LDAP v3 specifies the coding system of strings to be UTF-8. | 160 LDAP v3 specifies the coding system of strings to be UTF-8. |
163 Mule support is needed for this." | 161 Mule support is needed for this." |
164 :type 'symbol | 162 :type 'symbol |
165 :group 'ldap) | 163 :group 'ldap) |
393 ;; We should do something useful here... | 391 ;; We should do something useful here... |
394 (if (not (= 2 (length str))) | 392 (if (not (= 2 (length str))) |
395 (error "Invalid country string: %s" str))) | 393 (error "Invalid country string: %s" str))) |
396 | 394 |
397 (defun ldap-decode-string (str) | 395 (defun ldap-decode-string (str) |
398 (decode-coding-string str ldap-coding-system)) | 396 (if (fboundp 'decode-coding-string) |
397 (decode-coding-string str ldap-coding-system))) | |
399 | 398 |
400 (defun ldap-encode-string (str) | 399 (defun ldap-encode-string (str) |
401 (encode-coding-string str ldap-coding-system)) | 400 (if (fboundp 'encode-coding-string) |
401 (encode-coding-string str ldap-coding-system))) | |
402 | 402 |
403 (defun ldap-decode-address (str) | 403 (defun ldap-decode-address (str) |
404 (mapconcat 'ldap-decode-string | 404 (mapconcat 'ldap-decode-string |
405 (split-string str "\\$") | 405 (split-string str "\\$") |
406 "\n")) | 406 "\n")) |