diff -rupN a/cpplint.py b/cpplint.py --- a/cpplint.py 2025-04-08 01:16:55.000000000 +0000 +++ b/cpplint.py 2026-04-01 01:08:06.670000000 +0000 @@ -7448,7 +7448,7 @@ def ProcessConfigOverrides(filename): continue try: - with codecs.open(cfg_file, "r", "utf8", "replace") as file_handle: + with open(cfg_file, "r", encoding="utf-8") as file_handle: for line in file_handle: line, _, _ = line.partition("#") # Remove comments. if not line.strip(): @@ -7550,7 +7550,7 @@ def ProcessFile(filename, vlevel, extra_ if filename == "-": lines = sys.stdin.read().split("\n") else: - with codecs.open(filename, "r", "utf8", "replace") as target_file: + with open(filename, "r", encoding="utf-8") as target_file: lines = target_file.read().split("\n") # Remove trailing '\r'.