diff options
Diffstat (limited to 'lldb/examples/python/crashlog.py')
-rwxr-xr-x | lldb/examples/python/crashlog.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/examples/python/crashlog.py b/lldb/examples/python/crashlog.py index eb43e07..e80ecd9 100755 --- a/lldb/examples/python/crashlog.py +++ b/lldb/examples/python/crashlog.py @@ -449,7 +449,7 @@ class JSONCrashLogParser(CrashLogParser): head, _, tail = buffer.partition('\n') return json.loads(tail) - with open(path, 'r') as f: + with open(path, 'r', encoding='utf-8') as f: buffer = f.read() try: return parse_json(buffer) @@ -644,7 +644,7 @@ class TextCrashLogParser(CrashLogParser): } def parse(self): - with open(self.path,'r') as f: + with open(self.path,'r', encoding='utf-8') as f: lines = f.read().splitlines() for line in lines: @@ -865,7 +865,7 @@ def save_crashlog(debugger, command, exe_ctx, result, dict): result.PutCString( "error: invalid arguments, a single output file is the only valid argument") return - out_file = open(args[0], 'w') + out_file = open(args[0], 'w', encoding='utf-8') if not out_file: result.PutCString( "error: failed to open file '%s' for writing...", |