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

Re: Escaping non-printable characters

At 06:19 AM 3/1/2006, Luke Howard wrote:
>Apologies if this has been brought up before.
>I think it might be useful to always escape non-printable characters:

I think it's better to have minimal escaping on the wire as
DNs strings are (too) often presented by UIs as they appear on the
wire (on Unicode capable devices).

> #define LDAP_DN_NEEDESCAPE(c) \
>-       ( LDAP_DN_ESCAPE(c) || LDAP_DN_NE(c) )
>It seems to me nicer to see them escaped rather than have the whole
>DN base64 encoded, when presenting DNs using ldapsearch.

I view this as a separate issue.  For LDIF, ldapsearch(1)
escapes non-ASCII strings as we're not sure the user's terminal/printer
is UTF-8 capable.  It would be good to have a flag that caused
minimal-escaping LDIF to be produced (for those who do have UTF-8
capable terminal/printers).