[Lldb-commits] [PATCH] D16680: Re-submit rL258759: Write the session log file in UTF-8.

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Thu Jan 28 08:50:43 PST 2016


zturner added a comment.

On second thought I think the best solution is just to decide that we're
always going to use unicode strings everywhere.  That means using u""
instead of "" everywhere.  It's hard to do this all over the entire
codebase, but we can start with this and see what happens.  This is what I
tried to do in my followup patch the other day, but I think I missed the
place where we were writing self.getvalue() and that was still a regular
string.  So anywhere where we write a string variable and not a string
literal, we still have to decode it conditionally if we're on python 2

The place where we print the traceback, what happens if you do this:

self.session = io.open(path, mode="w", encoding="utf-8")
traceback.print_exc(file=self.session)

Does that work?


http://reviews.llvm.org/D16680





More information about the lldb-commits mailing list