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

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



I want to add some entries with non-ascii dn to ldap ,using netscape java sdk 4.1
my code like this:
String dn = "uid=SOME_NON_ASCII_CHARACTER,dc=company,dc=com";
 
base64DN = Base.encode(dn.getBytes("UTF8"));
 
set some entry attributes ...
 
LDAPEntry entry = new LDAPEntry(base64DN, attributeSets);
 
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!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com