[Date Prev][Date Next]
Re: String conversions UTF8 <-> ISO-8859-1
At 06:32 AM 5/23/2003, Hallvard B Furuseth wrote:
>> It seems far more reasonable just to hand the content of the PDU to
>> the application and let it, with its application-specific knowledge,
>> apply necessary conversions.
>The thing is, then everyone have to add a lot of code to do this.
Well, to some degree, yes. But they should have to write
their own conversion functions. And I'm actually fine with
providing them some common LDAP-specific tools. But
I do have a few concerns.
The first is simply that application be able to control when and
where the conversion takes place AND the application be given
enough (protocol context) information to do this.
The second is that the mechanism we provide be general. That is,
able to applied to API input and well as output, able to
be applied to "core" protocol fields as well as extension
protocol fields, etc.. For example, I'm going to implement
a read-back control which allows a client can attach to an
update operation to read back the entry. I rather not
have separate mechanisms for each protocol field.
And lastly, I rather not get into implementing transcoding
libraries. I rather leave this to icu, iconv, and others.
Also, I rather leave the choice of which transcoding library
to use up to the application developer (not the builder of
the LDAP libraries).
Now, I do want to dampen your desire to do work improving the
tool set. Improvements are needed. However, I am a bit leery
of callback approaches to this problem... maybe because our
past experience with the U-Mich LDAP transcoding callback
was quite bad. Maybe we've learned enough from that
experience to actually now do it right. But then again,
one has to wonder whether the approach is workable at all.