[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:18:34 PDT 2021


sylvestre.ledru updated this revision to Diff 366937.
sylvestre.ledru added a comment.

Replace " => '


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.366937.patch
Type: text/x-patch
Size: 516 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210817/7161bf2c/attachment-0001.bin>


More information about the cfe-commits mailing list