code: def handle_encodnig(html):
      
      encoding = _get_encoding(
          dhtmlparser.parseString(
              html.split("</head>")[0]
          )
      )
  
      if encoding == "utf-8":
          return html
  
      return html.decode(encoding).encode("utf-8")
docs: Look for encoding in given `html`. Try to convert `html` to utf-8.
  
      Args:
          html (str): HTML code as string.
  
      Returns:
          str: HTML code encoded in UTF.