fix encoding for starttls