Fix Mac builds

Bug:12493778

Cherry pick https://chromiumcodereview.appspot.com/22812004
to fix mac builds.

Change-Id: I2213d466780fee5630c9d7e00ab854c06baa723e
diff --git a/Source/core/scripts/make_token_matcher.py b/Source/core/scripts/make_token_matcher.py
index 3631ed9..10fae62 100755
--- a/Source/core/scripts/make_token_matcher.py
+++ b/Source/core/scripts/make_token_matcher.py
@@ -219,8 +219,8 @@
 
 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: