Can somebody help me with example on how to check if string contains characters which needs to be base64-encoded (I'm generating some ldif-output) For various reasons, I'm not going to use the python-ldap module found on http://python-ldap.sourceforge.net/ Best regards Bjorn Grotan