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

Japanese DN



Hi Folks,

I'm using openldap 2.1.17.
At first, I exported contacts from Outlook 2000 to a csv file.
and  now I'm trying to import into the Openldap server.
Several of the contacts have  in Japanese characters(shift-jis).
So, I did a little perl script to encode those characters to utf8 and base64
in sequence and made
this ldif sample:

dn:: Y249g2WDWINngsWCtyCCsYLqgs0sb3U9U2hhY2hvdSwgbz1vYWtsYXduLGM9SlA=
ou: Shachou
cn:: g2WDWINngsWCtyCCsYLqgs0=
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: officePerson
givenname:: g2WDWINngsWCtw==
sn:: g2WDWINngsWCtw==
mail: xxxx@xxxxx.jp
Comment:: iKSSbYynkqE=

When trying to:
ldapadd -c -D "cn=manager, o=oaklawn, c=JP" -w secret  -f test.ldif

I receive:
adding new entry "cn=テストです これは,ou=Shachou, o=oaklawn,c=JP"
ldapadd: update failed: cn=テストです これは,ou=Shachou, o=oaklawn,c=JP
ldap_add: Invalid DN syntax (34)
        additional info: invalid DN

I used code to convert the attribute's values:
     Jcode::convert($val,'utf8');
     $val = encode_base64($val);


I already gave a look on several posts and didn't find solution to this
case.

I appreciate any help.

Thanks in advance,

Isamar Maia