hello, I just want to know, how to add Chinese string to Openldap using LDAP C SDK for windows. the parameters in the SDK is char *, for example: LDAP_API(int) LDAP_CALL ldap_add( LDAP *ld, const char *dn, LDAPMod **attrs );
the problem is: (1) if i use Chinese in const char *dn, then the entry can be added to LDAP server, but when i use ldapsearch to check it, i found the dn is strange, like: dn:: Y249suLK1MP7s8YgQiBKZW5zZW4sIGRjPWpldHNlbixkYz1jb20= (2) if i use Chinese in LDAPMod **attrs, for example, set cn to a Chinese string, then, the SDK always return error in code(i used sun ldap_c_sdk 5.08\examples\add.c for testing): if (( rc = ldap_result2error( ld, result, 0 )) == LDAP_SUCCESS ) { printf( "Entry added successfully. I counted to %ld " "while waiting.\n", global_counter ); } else { printf( "Error while adding entry: %s\n", ldap_err2string( rc )); } the error string is: Error while adding entry: Invalid syntax so, any suggestion? _______________________________________________ mozilla-directory mailing list [EMAIL PROTECTED] http://mail.mozilla.org/listinfo/mozilla-directory