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

Re: make output of ldapsearch readable (disable base64)

Emmanuel Dreyfus wrote:
Michael Ströder <michael@stroeder.com> wrote:

It would hurt for e.g. 'jpegPhoto' or 'userCertificate;binary'.

What about a flag to get a display a la hexdump -C when the data is not pure ASCII?

This won't help the original poster. He wants that ldapsearch outputs LDIF which he can read directly on the console (probably with LANG=cn_CN.UTF-8).

ldapsearch -o output_style
where output_style is:
- ldif: ASCII strings in ASCII, and everything else in base64 (default)
- hexdump: ASCII strings in ASCII, binary as hexdump -C
- allhexdump: every attribute as hexdump
- binary: every attribute as raw binary

At the moment I would not introduce other output formats than LDIF. The usefulness of hex-dumps in comparison to base64-encoded data is debatable.

The only thing I could imagine without making ldapsearch schema-aware is a command-line option defining which attributes to output as UTF-8. If the user specifies jpegPhoto for that he's on his own if the raw binary output messes up the terminal.

Ciao, Michael.