diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/examples/bin_info.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/python/examples/bin_info.py b/python/examples/bin_info.py index 6b87eaf0..f74b9466 100644 --- a/python/examples/bin_info.py +++ b/python/examples/bin_info.py @@ -63,6 +63,10 @@ def get_bininfo(bv): start = bv.strings[i].start length = bv.strings[i].length string = bv.read(start, length) + try: + string = string.decode('utf8') + except UnicodeDecodeError: + pass contents += "| 0x%x |%d | %s |\n" % (start, length, string) return contents |
