code: def encode(cls, line):
          
          if not line.encoded:
              encoding = getattr(line, 'encoding_param', None)
              if encoding and encoding.upper() == cls.base64string:
                  line.value = b64encode(line.value).decode('utf-8')
              else:
                  line.value = backslashEscape(str_(line.value))
              line.encoded = True
docs: Backslash escape line.value.