AFAIK, the data is NOT stored as Base64, and LDAP operations also don't provide BASE64. Only LDIF as an Interchange format uses US-ASCII for representation. If you use some proper LDAP GUI, you can enter (and display) UTF-8 correctly.
Regards, Ulrich >>> "Tian Zhiying" <[email protected]> schrieb am 06.02.2015 um 03:22 in Nachricht <[email protected]>: > Hi , > > Thank you very much. > > How can I display chinese in LDAP database, rather than a base64 code? > > > -----邮件原件----- > 发件人: openldap-technical [mailto:[email protected]] 代表 > Dieter Klünter > 发送时间: 2015年2月5日 19:57 > 收件人: [email protected] > 主题: Re: Chinese display garbled > > Am Thu, 5 Feb 2015 19:17:25 +0800 > schrieb "Tian Zhiying" <[email protected]>: > >> Hello >> >> >> >> >> >> My ldif file type is UTF-8 as below. >> >> # file test.ldif >> >> test.ldif: UTF-8 Unicode text >> >> >> >> The test.ldif content includes Chinese, as below: >> >> # cat test.ldif >> >> dn: cn=行政部,ou=domain,dc=domain,dc=com >> >> cn: 行政部 >> >> gidnumber: 500 >> >> objectclass: posixGroup >> >> >> >> I can add it to the LDAP server. Then excuting this command “# >> ldapsearch -x -H ldap://localhost -b dc=domain,dc=com” , it display as >> below: >> >> >> >> # \E7\94\B0\E5\BF\97\E8\8B\B1, domain, domain.com >> >> dn:: >> Y24955Sw5b+X6IuxLG91PXRodW5kZXJzb2Z0LGRjPXRodW5kZXJzb2Z0LGRjPWNvbQ== >> >> cn:: 55Sw5b+X6Iux >> >> gidNumber: 500 >> >> objectClass: posixGroup >> >> objectClass: top >> > > This is just the base64 encoded DN string, decoded it is > > cn=田志英,ou=thundersoft,dc=thundersoft,dc=com > > -Dieter > > -- > Dieter Klünter | Systemberatung > http://sys4.de > GPG Key ID: E9ED159B > 53°37'09,95"N > 10°08'02,42"E
