<div dir="ltr"><div>Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:43:06) [MSC v.1600 32 bit (Intel)] on win32</div><div>Type "help", "copyright", "credits" or "license" for more information.</div><div>>>> dir(str)</div><div>['__add__', '__class__', '__contains__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__getnewargs__', '__gt__', '__hash__', '__init__', '__iter__', '__le__', '__len__', '__lt__', '__mod__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__rmod__', '__rmul__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'capitalize', 'casefold', 'center', 'count', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'format_map', 'index', 'isalnum', 'isalpha', 'isdecimal', 'isdigit', 'isidentifier', 'islower', 'isnumeric', 'isprintable', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'maketrans', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill']</div><div>>>></div><div><br></div><div>No decode method.  Which gets to the heart of the problem, I couldn't find a single syntax that worked on all platforms :-/</div><div><br></div><div>I think the best thing to do is make a decode_utf8() function that looks like this:</div><div><br></div><div>def decode_utf8(text):</div><div>    if six.PY2:</div><div>        return text.decode("utf-8", errors="replace")</div><div>    return text</div><div><br></div><div>and then write</div><div><br></div><div>print(decode_utf8(traceback), file=self.session)</div><div><br></div><div>and make sure that the file is opened with io.open(encoding="utf-8")</div><div><br></div><div><br></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Jan 28, 2016 at 7:12 AM Tamas Berghammer <<a href="mailto:tberghammer@google.com">tberghammer@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">tberghammer added a comment.<br>
<br>
I am more worried about Windows and python3 and I don't think we have any build bot running the tests on Windows. I don't really know what is the original issue this commit try to address so I plan to wait until Zachary can check it out (the current ToT works on Linux so I am not worried)<br>
<br>
<br>
<a href="http://reviews.llvm.org/D16680" rel="noreferrer" target="_blank">http://reviews.llvm.org/D16680</a><br>
<br>
<br>
<br>
</blockquote></div></div>