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

Re: ldapsearch scrables utf-8 dn

TJ wrote:
Hi all,

I hope that this will lead to some discussion on better utf-8 support.

It seems that ldapsearch does'n like dn's with utf-8 chars in it.

$ ldapsearch -xLLL "(uid=dwrc)" dn
dn:: Y249RMW1ciBDeW1ydSxvdT11c2VyQWNjb3VudHMsZGM9Y3NpcnQsZGM9amFuZXQ=

UTF is truly supported by OpenLDAP ever since. It is the client tool ldapsearch that, for portability reasons, prints values containing usually non-printable chars encoded in base64, as per LDIF (RFC 2849). So ldpasearch is fully RFC 2849 compliant since its purpose is to return valid LDIF data.

If you take your time and base64-decode that string you'll find your UTF8 value. If you don't like that client, use another, or provide a patch that, via a user switch, detects whether the terminal it's printing at supports UTF8 in a portable manner.


Ing. Pierangelo Masarati
OpenLDAP Core Team

SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
Office:  +39 02 23998309
Mobile:  +39 333 4963172
Email:   pierangelo.masarati@sys-net.it