def decode_cookie(value):
 try:
  return unicode(value, 'us-ascii')
 except UnicodeError:
  try:
   return unicode(value, 'utf-8')
  except UnicodeError:
   return unicode(value, 'iso8859', 'ignore')

def decode_cookie ( value ) : try : return unicode ( value , 'us-ascii' ) except UnicodeError : try : return unicode ( value , 'utf-8' ) except UnicodeError : return unicode ( value , 'iso8859' , 'ignore' )
this decodes a cookie given by encode_cookie .