With a little side of applesauce...

Wednesday, March 25, 2009

LDIF - handling line breaks in exports

Thanks to Novell, I finally understand how LDAP handles LDIF line breaks in exports:

"""
Line Folding within LDIF Files

To fold a line in an LDIF file, simply insert a line separator (a newline or a carriage return/newline pair) followed by a space at the place where you want the line folded. When the LDIF parser encounters a space at a beginning of the line, it knows to concatenate the rest of the data on the line with the data on the previous line. The leading space is then discarded.

You should not fold lines in the middle of a multi-byte UTF-8 character.

The following is an example of an LDIF file with a folded line (see lines 13 and 14):

1 version: 1
2 dn: cn=Peter Michaels, ou=Artists, l=San Francisco, c=US
3 sn: Michaels
4 givenname: Peter
5 objectClass: top
6 objectClass: person
7 objectClass: organizationalPerson
8 objectClass: iNetOrgPerson
9 telephonenumber: +1 415 555 0001
10 mail: Peter.Michaels@aaa.com
11 userpassword: Peter123
12 description: Peter is one of the most popular music
13 ians recording on our label. He's a big concert dr
14 aw, and his fans adore him.
15
"""

http://www.novell.com/documentation/ndsedir86/index.html?page=/documentation/ndsedir86/taoenu/data/a6i0f1p.html

No comments: