From a83ffeee9473456c89b6783f6edebcf61f8f5c97 Mon Sep 17 00:00:00 2001 From: grassmunk Date: Tue, 3 Dec 2019 21:27:15 -0800 Subject: [PATCH] Fixing ICONMETRICS/NONCLIENTMETRICS The decode would crash when it encountered a windows bytes, changing the encoding to cp1252 fixes it. --- Plus/Chicago95_Plus.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Plus/Chicago95_Plus.py b/Plus/Chicago95_Plus.py index 59dcc2d..cdede97 100755 --- a/Plus/Chicago95_Plus.py +++ b/Plus/Chicago95_Plus.py @@ -465,7 +465,7 @@ def get_file_name(config, section, key): def null_string(data): data = bytearray(data) - return data[:data.find(0)].decode('ascii') + return data[:data.find(0)].decode('cp1252') def parse_IconMetrics(IconMetrics): @@ -1213,4 +1213,4 @@ def main(): print("Thank you for using Chicago95 Plus!\n") -main() \ No newline at end of file +main()