[Date Prev][Date Next] [Chronological] [Thread] [Top]

How can I add non-ascii dn entry to ldap with netscape ldap java sdk?



I use netscape ldap java sdk 4.1, and I want to add non-ascii dn entry to ldap,
my code like this:
String dn = "uid=SOME_NON_ASCII_CHARACTERS,dc=company,dc=com";
base64DN = Base.encode(dn.getBytes("UTF8"));
set some entry attributes ...
LDAPEntry entry = new LDAPEntry(base64DN, attributeSets);
LDAPConnection.add(entry);
then I got this error msg:
netscape.ldap.LDAPException: error result (34); Invalid DN; Invalid DN syntax
at netscape.ldap.LDAPConnection.checkMsg(LDAPConnection.java:4852)
at netscape.ldap.LDAPConnection.add(LDAPConnection.java:2833)
at netscape.ldap.LDAPConnection.add(LDAPConnection.java:2848)
at netscape.ldap.LDAPConnection.add(LDAPConnection.java:2798)
What I'm wrong ? Can some one help me ?
Thanks you!


Do you Yahoo!?
Check out the new Yahoo! Front Page. www.yahoo.com