def body_encode(self, s, convert=True):
        if convert:
            s = self.convert(s)
        # 7bit/8bit encodings return the string unchanged (module conversions)
        if self.body_encoding is BASE64:
            return email.base64mime.body_encode(s)
        elif self.body_encoding is QP:
            return email.quoprimime.body_encode(s)
        else:
            return s
Body-encode a string and convert it to output_charset.
dataset/ETHPy150Open babble/babble/include/jython/Lib/email/charset.py/Charset.body_encode