Fix diff.py to assume UTF-8.
This commit is contained in:
parent
6c81f32426
commit
ad0c781c37
|
@ -6,7 +6,7 @@ import difflib
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
diff = difflib.unified_diff(
|
diff = difflib.unified_diff(
|
||||||
open(sys.argv[1]).readlines(),
|
open(sys.argv[1], encoding='utf-8').readlines(),
|
||||||
open(sys.argv[2]).readlines())
|
open(sys.argv[2], encoding='utf-8').readlines())
|
||||||
with open(sys.argv[3], 'w') as f:
|
with open(sys.argv[3], 'w', encoding='utf-8') as f:
|
||||||
f.write(''.join(diff))
|
f.write(''.join(diff))
|
||||||
|
|
Loading…
Reference in New Issue