'Decode the specified value to unicode. Assumes value is a ``str`` or
`FieldStorage`` object.
``FieldStorage`` objects are specially handled.'

def _decode_value(self, value):

    if isinstance(value, cgi.FieldStorage):
        value = copy.copy(value)
        if (self.decode_keys and isinstance(value.name, six.binary_type)):
            value.name = value.name.decode(self.encoding, self.errors)
        if six.PY2:
            value.filename = value.filename.decode(self.encoding, self.errors)
    else:
        try:
            value = value.decode(self.encoding, self.errors)
        except AttributeError:
            pass
    return value
