Skip to content

Commit 051e27b

Browse files
cclausstargos
authored andcommitted
tools: check-imports using utf-8
PR-URL: #30220 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent a219946 commit 051e27b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/check-imports.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from __future__ import print_function
44
import glob
5+
import io
56
import re
67
import sys
78

@@ -15,7 +16,7 @@ def do_exist(file_name, lines, imported):
1516

1617

1718
def is_valid(file_name):
18-
with open(file_name) as source_file:
19+
with io.open(file_name, encoding='utf-8') as source_file:
1920
lines = [line.strip() for line in source_file]
2021

2122
usings, importeds, line_numbers, valid = [], [], [], True

0 commit comments

Comments
 (0)