[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Fw: Do openldap client tool(ldapsearch etc.) support UTF-8?
Hi,
On Wednesday 20 April 2005 08:06, çåå wrote:
> > > At 11:19 PM 4/18/2005, =?gb2312?B?wt7Wvrzh?= wrote:
> > > >I using a a telnet term that support UTF-8(I can show correctly me
> > > > unicode txt) to slapdadd unicode ldif data and import successfully.
> > > >Using ldapbrowser to search openldap,the result is showed corectly,but
> > > > not with ldapsearch.
> > >
> > > ldapsearch(1) produces LDIF, a UTF-8 encoded Unicode
> > > file format.
> > >
> > > >Do openldap client tool(ldapsearch etc.) support UTF-8?
> > >
> > > Yes. But they also support and utilize LDIF base64
> > > encoding option where that is either required or
> > > deemed more appropriate than raw data (that may or
> > > may not be UTF-8 encoded Unicode).
>
> sorry ,I cannot understand you.
> I import unicode.ldif to openldap,which the desciption composed with
> unicode txt, ldapsearch show as "description:: VW5pY29kZea1i+ivlQ==",but
> ldapbrowser can get the correctly result
The output of ldapsearch is in LDIF format conforming to RFC 2849.
This reuires that strings that contain non-ASCII characters (such as non-ASCII
UTF-8 characters) are encoded in Base64.
> attribute(description) valude is show correctly in unicode.ldif:
> <28 [pldap] :/export/home/pldap>cat unicode.ldif
> # Organization for Example Corporation
> dn: dc=my-domain,dc=com
> objectClass: dcObject
> objectClass: organization
> dc: my-domain
> o: my-domain Corporation
> description: Unicodeæè
IMHO this is no valid LDIFv1 file
For the exact details please read the RFC.
CU
Peter
--
Peter Marschall
eMail: peter@adpm.de