Creation of an LDIF file with UTF-8 values by using server utilities

You can use a charset extension to create an LDIF format with UTF-8 values.

Manual creation of an LDIF file that contains UTF-8 values is difficult. In the LDIF file header, you can specify the extension that supports an Internet Assigned Numbers Authority (IANA) character set name along with the version number. For more information about the supported IANA character sets, see Supported IANA character sets.

Examples

Example 1:
For the server utilities to automatically convert from the specified character set to UTF-8, you can use the charset tag.
version: 1
charset: ISO-8859-1

dn: cn=Juan Griego, ou=University of New Mexico, o=sample
cn: Juan Griego
sn: Griego
description:: V2hhdCBhIGNhcmVmdWwgcmVhZGVyIHlvd
title: Associate Dean
title: [title in Spanish]
jpegPhoto:< file:///usr/local/photos/jgriego.jpg
In the following example, all attribute names with values that are separated by a single colon are translated from the ISO-8859-1 character set to UTF-8. All attribute names with values that are separated by a double colon, such as description:: V2hhdCBhIGNhcmVmdWwgcmVhZGVyIHlvd, must be base 64-encoded and are must be in binary or UTF-8 character strings. If values are read from a file, such as the jpegPhoto attribute, which is specified by the web address must also be in binary or UTF-8. For such attribute values, no translation is done from the specified charset to UTF-8.
Example 2:
In the following example, an LDIF file without the charset tag the content is expected to be in UTF-8:
# IBM Directorysample LDIF file
#
# The suffix "o=sample" should be defined before attempting to load
# this data.

 version: 1

 dn: o=sample
 objectclass: top
 objectclass: organization
 o: sample

 dn: ou=Austin, o=sample
 ou: Austin
 objectclass: organizationalUnit
 seealso: cn=Mary Smith, ou=Austin, o=sample
In IBM® Security Verify Directory, the LDIF file with the following content can be used without the version: 1 header information:
# IBM Directorysample LDIF file
#
#The suffix "o=sample" should be defined before attempting to load
#this data.

 dn: o=sample
 objectclass: top
 objectclass: organization
 o: sample

 dn: ou=Austin, o=sample
 ou: Austin
 objectclass: organizationalUnit
 seealso: cn=Linda Carlesberg, ou=Austin, o=sample