mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-24 06:50:20 +01:00
txtp_maker: tweak
This commit is contained in:
parent
8cbd7ad32a
commit
cc29ab1058
@ -185,8 +185,11 @@ class TxtpInfo(object):
|
|||||||
def _get_text(self, str):
|
def _get_text(self, str):
|
||||||
text = self._get_string(str, full=True)
|
text = self._get_string(str, full=True)
|
||||||
# stream names in CLI is printed as UTF-8 using '\xNN', so detect and transform
|
# stream names in CLI is printed as UTF-8 using '\xNN', so detect and transform
|
||||||
if text and '\\' in text:
|
try:
|
||||||
return text.encode('ascii').decode('unicode-escape').encode('iso-8859-1').decode('utf-8')
|
if text and '\\' in text:
|
||||||
|
return text.encode('ascii').decode('unicode-escape').encode('iso-8859-1').decode('utf-8')
|
||||||
|
except:
|
||||||
|
return text #odd/buggy names
|
||||||
return text
|
return text
|
||||||
|
|
||||||
def _get_value(self, str):
|
def _get_value(self, str):
|
||||||
|
Loading…
Reference in New Issue
Block a user