code: def get_encoding(binary):
      
  
      try:
          from chardet import detect
      except ImportError:
          LOGGER.error("Please install the 'chardet' module")
          sys.exit(1)
  
      encoding = detect(binary).get('encoding')
  
      return 'iso-8859-1' if encoding == 'CP949' else encoding
docs: Return the encoding type.