code: def utf(text):
      
      try:
          output = unicode(text, encoding='utf-8')
      except UnicodeDecodeError:
          output = text
      except TypeError:
          output = text
      return output
docs: Shortcut funnction for encoding given text with utf-8