Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1892)

Unified Diff: Source/core/scripts/make_token_matcher.py

Issue 22812004: Set encoding properly in make_token_matcher.py (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/scripts/make_token_matcher.py
diff --git a/Source/core/scripts/make_token_matcher.py b/Source/core/scripts/make_token_matcher.py
index 3631ed95f6d5fdd2eac7c4c542442b0a975c3fe0..10fae628c1cf4dc12686330747e2bf0e8aa9faba 100755
--- a/Source/core/scripts/make_token_matcher.py
+++ b/Source/core/scripts/make_token_matcher.py
@@ -219,8 +219,8 @@ class CaseLineProcessor(LineProcessor):
def process_file(input_name, output_name):
"""Transforms input file into legal C++ source code."""
- with io.open(input_name) as input_file:
- with io.open(output_name, 'w') as output_file:
+ with io.open(input_name, 'r', -1, 'utf-8') as input_file:
+ with io.open(output_name, 'w', -1, 'utf-8') as output_file:
processor = MainLineProcessor(output_file)
input_lines = input_file.readlines()
for line in input_lines:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698