Skip to content
This repository has been archived by the owner on Aug 13, 2020. It is now read-only.

Commit

Permalink
fix: change lang key str from ascii to latin code for ver1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
atoring committed Nov 19, 2018
1 parent 95a3355 commit a23a602
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions frostpunk_mod/language.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ def set_data(self, lang_idx, data):
text_size = size_struct.unpack_from(data, offset)[0]
offset += 2
# log("text size", text_size)
index = data[offset:offset+text_size].decode("ascii")
# index = data[offset:offset+text_size].decode("ascii")
index = data[offset:offset+text_size].decode("latin-1")
offset += text_size
# log("index", index)
text_size = size_struct.unpack_from(data, offset)[0]*2
Expand Down Expand Up @@ -140,7 +141,8 @@ def get_data(self, lang_idx):
str = text.get_text(lang_idx)
if str is not None:
data.extend(size_struct.pack(len(index)))
data.extend(index.encode("ascii"))
# data.extend(index.encode("ascii"))
data.extend(index.encode("latin-1"))
data.extend(size_struct.pack(len(str)))
data.extend(str.encode("utf-16-le"))
cnt += 1
Expand Down

0 comments on commit a23a602

Please sign in to comment.