[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: importing multi line fields
On Thu, 07 Jan 1999 08:41:31 EST, Ben Collins wrote:
> I am trying to seed a database by creating an ldif file. One of the
> fields in the entries is going to contain output from an email. What
> conversions (I'm using perl) do I need to perform in order for it to
> not confuse ldif2ldbm with the line feeds and all?
>
> --
> ----- -- - -------- --------- ---- ------- ----- - - --- --------
> Ben Collins <b.m.collins@larc.nasa.gov> Debian GNU/Linux
> UnixGroup Admin - Jordan Systems Inc. bcollins@debian.org
> ------ -- ----- - - ------- ------- -- The Choice of the GNU Generation
CRs and LFs are "unsafe" in LDIF values, so you need to base-64 encode
them as per the LDIF drafts. Look at the MIME::Base64 module. You may
also need to wrap long lines as well, but there's more than one way to
do that :-)
The Net::LDAP package (perl-ldap-0.09) from CPAN has an LDIF module you
could look at too.
Chris