[PATCH] D83984: Explicitly use utf-8 in send_string

serge via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 7 00:31:25 PDT 2020


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb3205e2ace43: [scan-view] Explicitly use utf-8 in send_string (authored by Tomas Rix <trix at juniper.net>, committed by serge-sans-paille).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83984

Files:
  clang/tools/scan-view/share/ScanView.py


Index: clang/tools/scan-view/share/ScanView.py
===================================================================
--- clang/tools/scan-view/share/ScanView.py
+++ clang/tools/scan-view/share/ScanView.py
@@ -744,7 +744,7 @@
         return f
 
     def send_string(self, s, ctype='text/html', headers=True, mtime=None):
-        encoded_s = s.encode()
+        encoded_s = s.encode('utf-8')
         if headers:
             self.send_response(200)
             self.send_header("Content-type", ctype)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83984.290190.patch
Type: text/x-patch
Size: 501 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200907/2b83705a/attachment.bin>


More information about the cfe-commits mailing list