[PATCH] D64129: [clang-scan-view] Force utf-8 when handling report (python2 only)
Phabricator via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 16 01:57:05 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL366194: [clang-scan-view] Force utf-8 when handling report (python2 only) (authored by serge_sans_paille, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Changed prior to commit:
CHANGES SINCE LAST ACTION
@@ -764,11 +764,11 @@
variables['report'] = m.group(2)
- f = open(path,'r')
+ f = open(path,'rb')
fs = os.fstat(f.fileno())
- data = f.read()
+ data = f.read().decode('utf-8')
for a,b in kReportReplacements:
data = a.sub(b % variables, data)
return self.send_string(data, ctype, mtime=fs.st_mtime)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 679 bytes
Desc: not available
More information about the cfe-commits