On 25/10/05 2:15, Karsten Gorling <[EMAIL PROTECTED]> wrote: > * Steven.He <[EMAIL PROTECTED]> [051025 15:03]: >> mail: [EMAIL PROTECTED] >> accountStatus: active >> mailMessageStore: /vmail/helin/ >> there is 2 chinese characters in sn attribute, so when I add this ldif >> file to ldap-server, it returns ldap_modify: Invalid syntax (21) >> additional info: sn: value #0 invalid per syntax. so how to resolve >> the problem and thank you very much~ > > All non 7-bit characters must be base64-encoded before the upload to > the LDAP-Server.
Er, not quite. > The OpenLDAP-utils do the encoding by themselve, provided > that the LDIF-file itself is encoded in UTF-8. So I would check the > encoding of your LDIF-file. The sn values that go across the network *must* be UTF-8. If you want to store attribute values in an LDIF file you must also obey the LDIF rules, which are that some strings need to be base64-encoded inside the file. (eg strings containing line breaks, or spaces in particular places, or non-ASCII characters etc.) These strings are base64-decoded by the tool that reads the file before sending to the server. Cheers, Chris