Answer the question
In order to leave comments, you need to log in
Problems with encoding in python script how to solve?
Tried to parry the game with Nscripter on Rren'py found on
D:\ren'py games\nscripter2renpy-master\test\ns2ren\src>python parser.py 0.txt > scripts.rpy
Traceback (most recent call last):
File "parser.py", line 910, in <module>
parser.tokenize(input.read())
UnicodeDecodeError: 'shift_jis' codec can't decode byte 0x8c in position 3394: illegal multibyte sequence
input = open(sys.argv[1], 'r', encoding='sjis')
input = codecs.decode(sys.argv[1], 'hex')
input = pd.read_csv(sys.argv[1], encoding= 'unicode_escape')
input = open(sys.argv[1], 'rb').read().decode('ISO-8859-1')
input = codecs.open(sys.argv[1], "r", "sjis")
input = codecs.open(sys.argv[1],"rb",'shift_jisx0213').read()
input = codecs.open(sys.argv[1],"rb",'cp932').read()
input = open(sys.argv[1], 'r').decode('shift-jis').encode('utf-8')
input = codecs.open(sys.argv[1],"r","utf-8")
input = pd.read_csv(sys.argv[1], encoding="cp932")
gosub *regard_update
Answer the question
In order to leave comments, you need to log in
This error means that the character 0x8C the script cannot decode. Are you sure you are using the same version of Python that is on github?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question