I was running a python tool and trying to save its output to a file. If I don't save the output to a file, the tool runs perfectly fine. But when I try to save the output to the file, it throws following error and interrupt the program:
File "./androdiff.py", line 118, in <module>
main(options, arguments)
File "./androdiff.py", line 94, in main
ddm.show()
File "./elsim/elsim/elsim_dalvik.py", line 772, in show
self.eld.show()
File "./elsim/elsim/elsim.py", line 435, in show
i.show()
File "./elsim/elsim/elsim_dalvik.py", line 688, in show
print hex(self.bb.bb.start + self.offset), self.pos_instruction, self.ins.get_name(), self.ins.show_buff( self.bb.bb.start + self.offset )
UnicodeEncodeError: 'ascii' codec can't encode character u'\u0111' in position 35: ordinal not in range(128)
I've tried command |less
, command > output
and command | tee output
, all of them will throw such error.
Please help to resolve the issue.
Thanks!