UnicodeDecoreError in nnmnkwii.io.hts.load on Windows
oatsu-gh opened this issue · comments
oatsu commented
Loading HTS label file (utf-8) on Windows 10, UnicodeDecodeError was raised.
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\nnmnkwii\io\hts.py", line 325, in load
return labels.load(path, lines)
File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\nnmnkwii\io\hts.py", line 199, in load
lines = f.readlines()
UnicodeDecodeError: 'cp932' codec can't decode byte 0x86 in position 16: illegal multibyte sequence
I wish that nnmnkwii.io.hts.load supports selecting character encoding, with argument encoding='utf-8'
.
Ryuichi Yamamoto commented
Hi, thanks for raising the issue. I am okay to add a keyword argument as encoding="utf-8"
. However, I guess the easiest solution is to set the environmental variable PYTHONIOENCODING=utf-8
.
oatsu commented
Thank you, I'll try it.