From: Dan Oscarsson <[EMAIL PROTECTED]>
Date: Wed Aug 6, 2003  12:34:54 Europe/London
To: [EMAIL PROTECTED]
Subject: How to handle character set in perl-ldap?
Reply-To: Dan Oscarsson <[EMAIL PROTECTED]>

Hi

I have been using my own LDAP module in perl for many years.
Now I am looking if I could use perl-ldap (Net::LDAP) instead.
I have looked at the code and much looks good. So far I have found one
minor thing and one major. As the code is quite advanced I am unsure
of the best way to do things. So I hope you can help me.

Minor detail: Why is not deleteoldrdn=1 default in moddn?
I have never in any code I have using LDAP allowed old rdn to remain.
I would expect most people to want the old rnd to be deleted
automatically.

Major problem: Character set conversion.
On my system I use ISO 8859-1 as the character set. But LDAPv3 uses UTF-8.
So in my own LDAP code, the translation between protocol format (UTF-8)
and system character set (ISO 8859-1) is done automatically inside
the LDAP module. This means that all strings used (in DN, attributes, filters)
are in ISO 8859-1. In is only internally when the LDAP server is called
the strings are translated to/from UTF-8.
I have looked at the code for perl-ldap to see where this translation
could be added. I would prefer to add it just before the data is
converted into ASN, and when decoded from ASN, but I am not sure if this
is easily done as the code is written now.
Do you have any suggestions where it could be done or how it should be done?
If you are interested I can send my patches to you to include in perl-ldap,
if I can find a good way to add it in.


Regards,

Dan
--
Dan Oscarsson
Ki Consulting & Solutions AB Email: [EMAIL PROTECTED]
Box 85
201 20 Malmo, Sweden






Reply via email to