'Turn a value into a bytestring encoded in the output charset.'

def make_bytes(self, value):

    if self.has_header(u'Content-Encoding'):
        return bytes(value)
    if isinstance(value, bytes):
        return bytes(value)
    if isinstance(value, six.text_type):
        return bytes(value.encode(self._charset))
    return force_bytes(value, self._charset)
