blob: 5705dee7d4c095760697771042e962de54c40372 [file] [log] [blame] [edit]
--- babl-0.1.82/tools/xml-insert.py.orig 2020-10-12 10:39:16.580051300 +0300
+++ babl-0.1.82/tools/xml-insert.py 2020-10-12 10:42:16.168046100 +0300
@@ -48,7 +48,7 @@
args = Args()
try:
- in_file = open(args.input, 'r')
+ in_file = open(args.input, mode='r', encoding='utf-8')
except IOError:
print('cannot access input file ' + args.input,
file=sys.stderr)
@@ -75,7 +75,7 @@
# read in insert file
try:
- ins_file = open(os.path.realpath(insert[1]), 'r')
+ ins_file = open(os.path.realpath(insert[1]), mode='r', encoding='utf-8')
except IOError:
print ('cannot open insert file %s - skipping' % insert[1],
file=sys.stderr)
@@ -93,7 +93,7 @@
# output to file or stdout
if args.output:
try:
- out_file = open(os.path.realpath(args.output), 'w')
+ out_file = open(os.path.realpath(args.output), mode='w', encoding='utf-8')
except IOError:
print('cannot open output file %s' % args.output)
sys.exit(1)