summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorcclauss <cclauss@me.com>2019-11-02 13:35:22 +0100
committercclauss <cclauss@me.com>2019-11-05 11:28:39 +0100
commitaa4e54e52382a236c4d16374f07f43077185a22c (patch)
tree8c29e4efc16e0faf1e8bb42216aedd57dd16e377 /tools
parent1f2fdc9538f2ee9d9fad68137798c49113e96274 (diff)
downloadandroid-node-v8-aa4e54e52382a236c4d16374f07f43077185a22c.tar.gz
android-node-v8-aa4e54e52382a236c4d16374f07f43077185a22c.tar.bz2
android-node-v8-aa4e54e52382a236c4d16374f07f43077185a22c.zip
tools: check-imports using utf-8
PR-URL: https://github.com/nodejs/node/pull/30220 Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/check-imports.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/check-imports.py b/tools/check-imports.py
index b71b4a9271..51b4e63aa0 100755
--- a/tools/check-imports.py
+++ b/tools/check-imports.py
@@ -2,6 +2,7 @@
from __future__ import print_function
import glob
+import io
import re
import sys
@@ -15,7 +16,7 @@ def do_exist(file_name, lines, imported):
def is_valid(file_name):
- with open(file_name) as source_file:
+ with io.open(file_name, encoding='utf-8') as source_file:
lines = [line.strip() for line in source_file]
usings, importeds, line_numbers, valid = [], [], [], True