From ca4a6e309ec458dd359f1bf25f91a4443758365a Mon Sep 17 00:00:00 2001 From: William Toohey Date: Tue, 19 Jun 2018 16:26:43 +1000 Subject: [PATCH] re-add 0x00 encoding --- kbinxml/kbinxml.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kbinxml/kbinxml.py b/kbinxml/kbinxml.py index 05a099b..4dea4bc 100644 --- a/kbinxml/kbinxml.py +++ b/kbinxml/kbinxml.py @@ -27,6 +27,7 @@ BIN_ENCODING = 'cp932' # windows shift-jis variant # NOTE: all of these are their python codec names encoding_strings = { + 0x00: 'cp932', 0x20: 'ASCII', 0x40: 'ISO-8859-1', 0x60: 'EUC_JP', @@ -35,6 +36,8 @@ encoding_strings = { } encoding_vals = {val : key for key, val in encoding_strings.items()} +# ensure that duplicated value from above is correct. Avoid exporting 0x00 type +encoding_vals['cp932'] = 0x80 def debug_print(string): if DEBUG: