diff options
| author | Jordan Wiens <github@psifertex.com> | 2025-09-26 15:55:40 -0400 |
|---|---|---|
| committer | Jordan <github@psifertex.com> | 2025-10-01 15:19:28 -0400 |
| commit | e69f1b5525b6bb6d8cd08849537dba890c016b93 (patch) | |
| tree | ae7aa18206820c4199f5a948f43f42b0a396071c /python/settings.py | |
| parent | 420d622f83ad687d5848211f52e2e21693a44a13 (diff) | |
better handling for when utf8 decoding fails
Diffstat (limited to 'python/settings.py')
| -rw-r--r-- | python/settings.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/python/settings.py b/python/settings.py index 947d2963..4f63c76f 100644 --- a/python/settings.py +++ b/python/settings.py @@ -276,7 +276,10 @@ class Settings: assert result is not None, "core.BNSettingsKeysList returned None" out_list = [] for i in range(length.value): - out_list.append(result[i].decode('utf8')) + try: + out_list.append(result[i].decode('utf8')) + except UnicodeDecodeError: + out_list.append(result[i].decode('charmap')) core.BNFreeStringList(result, length) return out_list |
