From 9af32ac4111fe73e3088ae930455a661a0a4236d Mon Sep 17 00:00:00 2001 From: cidoku Date: Mon, 31 Mar 2025 15:39:58 -0300 Subject: [PATCH] partial support for encoded evidence --- gameview.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/gameview.py b/gameview.py index 55811ad..1a79689 100644 --- a/gameview.py +++ b/gameview.py @@ -2041,9 +2041,18 @@ class GUI(QtGui.QWidget): inifile = ConfigParser() inifile.read(path) for section in inifile.sections(): - name = ini.read_ini(inifile, section, "name").decode('utf-8').replace('\\n', '\n') - description = ini.read_ini(inifile, section, "description").decode('utf-8').replace('\\n', '\n') + name = ini.read_ini(inifile, section, "name").replace('\\n', '\n').replace('\\"', '"').rstrip() + description = ini.read_ini(inifile, section, "description").replace('\\n', '\n').replace('\\"', '"').rstrip() image = ini.read_ini(inifile, section, "image", "empty.png") + + # Remove opening and closing quotes + if description[0] == '"' and description[-1] == '"': + description = description[1:-1] + + # Not all evidence files are plain unicode + name = name.decode("unicode_escape") if "\\x" in name else name.decode('utf-8') + description = description.decode("unicode_escape") if "\\x" in description else description.decode('utf-8') + evidence.append([name, description, image]) if self.privateinv or is_autoload: