[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
LDAP support and UTF-8?
From: |
Pavel Janík |
Subject: |
LDAP support and UTF-8? |
Date: |
Tue, 01 Jan 2002 23:09:12 +0100 |
User-agent: |
Gnus/5.090005 (Oort Gnus v0.05) Emacs/21.1.50 (i386-suse-linux-gnu) |
Hi,
I have spend some time today to make LDAP working in my setup and have
some minor notes/ideas:
- current net/ldap.el is ready to ldapsearch from OpenLDAP version 1. Now,
the version 2 is more widely used and its output is incompatible with the
ldap.el expectations. One of the arguments which is used in ldap.el
("-B") is not used in ldapsearch version 2.
- the smallest modification which allows to use OpenLDAP version 2's
ldapsearch is to set ldap-ldapsearch-args to ("-L" "-L" "-t" "-x").
-L -L options are for LDIF v1 output format
-t (-t -t efectively, because we already use -t in ldap.el) is to use
temporary files for all fields (which ldap.el expects)
- I use this patch which allows me to see ISO 8859-2 characters in
eudc-query-form output. Temporary files are in UTF-8 so we must read them
as such. I do not know however, what efect will this have on jpegPhoto
and similar fields, because I can not test it right now :-( Do you agree
with this patch? I see a small problem here - you must save the output
from eudc-query-form in UTF-8 then, but this is no problem for me.
--- ldap.el.~1.4.~ Sat Dec 29 18:30:25 2001
+++ ldap.el Tue Jan 1 19:11:43 2002
@@ -590,7 +590,8 @@
(save-excursion
(set-buffer bufval)
(erase-buffer)
- (insert-file-contents-literally value)
+ (let ((coding-system-for-read 'utf-8))
+ (insert-file-contents value))
(delete-file value)
(setq value (buffer-substring (point-min) (point-max))))
(setq record (cons (list name value)
- I have an idea: make default values for ldap-ldapsearch-args to be ready
for version 2 of OpenLDAP which is more widely used and make a note in
etc/PROBLEMS about the right value for version 1. Or maybe we can define
a switch in the ldap.el alone: if ldap-ldapsearch-args is nil, the value
of ldap-ldapsearch-version1-args or ldap-ldapsearch-version2-args will be
used depending on the value of ldap-ldapsearch-version. What do you
think?
BTW - How many of you use LDAP? OpenLDAP version 1 or 2?
--
Pavel Janík
Well, after spending a lot of time hacking on Emacs you develop
a particular intimacy with point. A sort of friendship which
doesn't allow for "the" to appear in front of "point" any more.
-- Stefan Monnier in comp.emacs
- LDAP support and UTF-8?,
Pavel Janík <=