def ListNotUtf8SourceFile(srcdir): paths = FileUtils.GetAllFiles(srcdir, ".h|.cpp") for path in paths: if not FileUtils.EnsureUtf8WithChinese(path): logging.warning(path) pass pass