diff --git a/yamllint/cli.py b/yamllint/cli.py index 9a39bd8c..fd7b7a3a 100644 --- a/yamllint/cli.py +++ b/yamllint/cli.py @@ -219,7 +219,7 @@ def run(argv=None): for file in find_files_recursively(args.files, conf): filepath = file[2:] if file.startswith('./') else file try: - with open(file, newline='') as f: + with open(file, newline='', encoding='utf-8') as f: problems = linter.run(f, conf, filepath) except OSError as e: print(e, file=sys.stderr)