[PATCH] D107887: scan-build-py: Force the opening in utf-8

Sylvestre Ledru via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 17 10:20:48 PDT 2021


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG70b06fe8a186: scan-build-py: Force the opening in utf-8 (authored by sylvestre.ledru).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107887/new/

https://reviews.llvm.org/D107887

Files:
  clang/tools/scan-build-py/lib/libscanbuild/report.py


Index: clang/tools/scan-build-py/lib/libscanbuild/report.py
===================================================================
--- clang/tools/scan-build-py/lib/libscanbuild/report.py
+++ clang/tools/scan-build-py/lib/libscanbuild/report.py
@@ -417,7 +417,7 @@
         'bug_path_length': 1
     }
 
-    with open(filename) as handler:
+    with open(filename, encoding='utf-8') as handler:
         for line in handler.readlines():
             # do not read the file further
             if endsign.match(line):


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107887.366940.patch
Type: text/x-patch
Size: 516 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210817/02fee72d/attachment.bin>


More information about the cfe-commits mailing list