Oracle® Internet Directory Administrator's Guide 10g (9.0.4) Part Number B12118-01 |
|
Globalization Support in the Directory, 7 of 7
Oracle Internet Directory ensures that the reading and writing of text data from and to LDIF files are done in UTF-8 encoding as specified by the LDAP standard.
This section provides an example of the argument you use for each of the following bulk tools:
"Bulk Operations Command-Line Tools Syntax" for a list of arguments for each bulk tool
See Also:
Add to the command the argument -encode "
character_set"
where the input LDIF file is encoded in "character_set".
For example:
bulkload.sh -connect connect_string -encode ".ZHS16GBK" my_ldif_file
Note: To run shell script tools on the Windows operating system, you need one of the following UNIX emulation utilities:
|
The ldifwrite utility always writes BASE64 encoded values for multibyte strings.
The BASE64 encoding could be of the UTF-8 strings as they are stored in the directory server, or of native strings as specified by the NLS_LANG environment variable setting when running ldifwrite.
For example:
ldifwrite -c connect_string -b baseDN -f output_file
In this example, if the NLS_LANG environment variable is not set, or is set to language_territory.AL32UTF8
, then the output LDIF file will contain BASE64-encoded UTF-8 strings for any multibyte characters.
To reload this LDIF file into the directory by using ldapaddmt, use the following syntax:
ldapaddmt -h my_host -p port_number -f output_file
In this case, the -E
argument is not required because the decoded BASE64 strings are already UTF-8-encoded and can be readily sent to the server.
If the NLS_LANG environment variable is set to a character set other than UTF-8--for example, ".ZHS16GBK"
--then the output LDIF file will contain a BASE64 encoded value of simplified Chinese (.ZHS16GBK
) strings.
To reload this LDIF file into the directory using ldapaddmt, use the following syntax:
ldapaddmt -h host -p port -E ".ZHS16GBK" -f my_input_file.LDIF
In this case the -E
argument is required because the decoded BASE64 strings are simplified Chinese, which need to be converted to UTF-8 strings before being sent to the server.
Add -encode ".
character_set"
to the command.
For example:
bulkdelete.sh -connect connect_string -encode ".ZHS16GBK" -base "ou=manufacturing,o=acme,c=us"
In this case the value for the -base
option could be in the ZHS16GBK
native character set, that is, simplified Chinese.
Note: To run shell script tools on the Windows operating system, you need one of the following UNIX emulation utilities:
|
Add -E ".
character_set"
to the command the argument.
For example:
bulkmodify.sh -c my_service_name -E ".ZHS16GBK" -b "ou=manufacturing,o=acme,c=us" -r title -v Foreman -f "objectclass=*"
In this example, values for the -b
, -v,
and -f
arguments
can be specified using the simplified Chinese character set.
Note: To run shell script tools on the Windows operating system, you need one of the following UNIX emulation utilities:
|
|
![]() Copyright © 1999, 2003 Oracle Corporation. All Rights Reserved. |
|