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

答复: Chinese display garbled



Hi ,

Thank you very much.

How can I display chinese in LDAP database, rather than a base64 code?
 

-----邮件原件-----
发件人: openldap-technical [mailto:openldap-technical-bounces@openldap.org] 代表 Dieter Klünter
发送时间: 2015年2月5日 19:57
收件人: openldap-technical@openldap.org
主题: Re: Chinese display garbled

Am Thu, 5 Feb 2015 19:17:25 +0800
schrieb "Tian Zhiying" <tianzy1225@thundersoft.com>:

> 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