Hello
It would be nice if ldapsearch could display non-ASCII strings in a configurable charset, instead of always encoding in base64.
I understand the current behavior is a requirement for LDIF compliance, but I believe we can add a non-LDIF compliant output, if this is what the user requested.
Attached is a quick patch that will let ldapsearch output in the charset specified by LDAP_CHARSET environment variable (inspiration from LESS_CHARSET for less(1)). That makes life much more confortable when handling non-english data.
It uses iconv() if <iconv.h> is detected. This function has been in POSIX for a while: https://pubs.opengroup.org/onlinepubs/007908775/xsh/iconv.html
Opinions? Thoughts?