def _encodeValue(self, value):
        if isinstance(value, unicode):
            return value.encode('utf8')
        return value
Encode a single header value to a UTF-8 encoded bytestring if required.
dataset/ETHPy150Open twisted/twisted/twisted/web/http_headers.py/Headers._encodeValue