Skip to content

Conversation

@yoshi486x
Copy link

Issue

When trying to parse CSA file in a Windows environment, the below error appeared due to not specifying the encoding format.

UnicodeDecodeError: 'cp932' codec can't decode byte 0x86 in position 47: illegal multibyte sequence

Solution

This fix will specify the two encoding formats already used to parse a KIF file which are 'cp932' and 'utf-8-sig'.

return Parser.parse_str(f.read())
except:
pass
return None
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be great if the function raises an exception when we cannot decode as cp932 and utf-8-sig instead of returning None.

@gunyarakun
Copy link
Owner

@yoshi486x
Thank you for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants