On Wed, 2003-08-13 at 20:50, Kurt D. Zeilenga wrote: > I don't think the LDAP API should do any trancoding, the API should > be a simple conduit between the application and the wire. Any > transcoding desires should be done by the application (by directly > calling APIs specifically designed to do transcoding).
I have been following this thread a bit. And while I would agree that the API (Net::LDAP in this case) should not do transcoding, I don't see any reason why it cannot provide hooks to make the application developers life easier. If the developer has decided that the application and the server are using different character sets and/or encodings then having every callback routine first pass the entry to a transcoding sub is just asking for mistakes. What if its forgotten, or the callback is called twice with the same entry. If the API had a callback that would be called on every entry after it was extracted fro the ASN.1 or just before it was encoded into ASN.1 then this transcoding can be done in one place. Graham.