partial support for encoded evidence
This commit is contained in:
parent
0659914127
commit
9af32ac411
13
gameview.py
13
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:
|
||||
|
Loading…
Reference in New Issue
Block a user