[PATCH] D33468: Enable unicode output on terminals.

Vassil Vassilev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 23 15:01:04 PDT 2017


v.g.vassilev created this revision.
Herald added a reviewer: modocache.

Patch by Axel Naumann!


Repository:
  rL LLVM

https://reviews.llvm.org/D33468

Files:
  utils/lit/lit/ProgressBar.py


Index: utils/lit/lit/ProgressBar.py
===================================================================
--- utils/lit/lit/ProgressBar.py
+++ utils/lit/lit/ProgressBar.py
@@ -106,6 +106,10 @@
         try: curses.setupterm()
         except: return
 
+        # We want unicode output and have unicode input.
+        reload(sys)
+        sys.setdefaultencoding('utf8')
+
         # Look up numeric capabilities.
         self.COLS = curses.tigetnum('cols')
         self.LINES = curses.tigetnum('lines')


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33468.100008.patch
Type: text/x-patch
Size: 504 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170523/367c62ec/attachment.bin>


More information about the llvm-commits mailing list