code: def readFile(cls, filepath):
          
          for mode in ("utf-8", 'gbk', 'cp1252', 'windows-1252', 'latin-1'):
              try:
                  with open(filepath, mode='r', encoding=mode) as f:
                      content = f.read()
                      cit.info('以 {} 格式打开文件'.format(mode))
                      return content
              except UnicodeDecodeError:
                  cit.warn('打开文件：尝试 {} 格式失败'.format(mode))
          return None
docs: Try different encoding to open a file in readonly mode