RE: Conversion question

"Xu, Qiang (FXSGSC)" <[email protected]> Fri, 6 Nov 2009 11:21:07 +0800
Newsgroups gmane.comp.mozilla.devel.directory
Message-ID <D8C9BC7FFCF8154FB7141EB8DB609C172F0F3E5F6C@SGPAPHQ-EXSCC01.dc01.fujixerox.net>
> -----Original Message-----
> From: 
> [email protected]
>  
> [mailto:[email protected]
> illa.org] On Behalf Of Markus Moeller
> Sent: Friday, November 06, 2009 3:54 AM
> To: [email protected]
> Subject: Re: Conversion question 
> 
> 
>  If I use ldapsearch  for example I get
> 
> 
> ldapsearch -LLL -H ldap://w2k3r2.win2003r2.home -s sub -b 
> dc=win2003r2,dc=home "(cn=markus a*)" memberof SASL/GSSAPI 
> authentication started SASL username: 
> [email protected] SASL SSF: 56 SASL data security 
> layer installed.
> dn: CN=Markus A Moeller,CN=Users,DC=win2003r2,DC=home
> memberOf:: 
> Q049TcO2bGxlcixPVT1UZXN0R3JvdXBzLERDPXdpbjIwMDNyMixEQz1ob21l
> memberOf: CN=SQUID_ALLOW,CN=Users,DC=win2003r2,DC=home
> memberOf: CN=Administrators,CN=Builtin,DC=win2003r2,DC=home
> #
> refldap://ForestDnsZones.win2003r2.home/DC=ForestDnsZones,DC=w
> in2003r2,DC=home
> #
> refldap://DomainDnsZones.win2003r2.home/DC=DomainDnsZones,DC=w
> in2003r2,DC=home
> # refldap://win2003r2.home/CN=Configuration,DC=win2003r2,DC=home
> 
> 
> I get entries which are Octet Strings. Is there a ldap 
> function to convert to the real string ?

As far as I know, there is no LDAP func to do such things.
 
> What would I need to do to use the result in a filter for a 
> new query ?  Can I just use the octet string ?

Usually, LDAP servers store information in UTF-8 encoding. You just need to convert the response to Latin-9 (ISO_8859_15). This is the practice we are adopting in our printers, which uses MozLDAP libraries.

Regards,
Xu Qiang