1
0
mirror of https://github.com/Escartem/AnimeWwise.git synced 2026-06-04 23:40:25 +08:00

fixed decoding issue

This commit is contained in:
Escartem
2023-11-24 14:52:35 +01:00
parent 718fa457ba
commit 3609fe3d19

View File

@@ -95,9 +95,9 @@ def get_langs(langs_sector_size):
reader.SetBufferPos(lang_offset)
if test_byte_1 == 0 or test_byte_2 == 0:
lang_name = reader.ReadBytes(0x20).decode("utf-16le").replace("\x00", "")
lang_name = reader.ReadBytes(0x20).decode("utf-16le", "ignore").replace("\x00", "")
else:
lang_name = reader.ReadBytes(0x10).decode("utf-8").replace("\x00", "")
lang_name = reader.ReadBytes(0x10).decode("utf-8", "ignore").replace("\x00", "")
lang_array[lang_id] = lang_name