Skip to content

Fix UnicodeDecodeError on Windows by explicitly setting UTF-8 encoding#64

Open
DRobinson4105 wants to merge 1 commit intodmort27:masterfrom
DRobinson4105:master
Open

Fix UnicodeDecodeError on Windows by explicitly setting UTF-8 encoding#64
DRobinson4105 wants to merge 1 commit intodmort27:masterfrom
DRobinson4105:master

Conversation

@DRobinson4105
Copy link

Resolves dmort27/epitran#188

This specifies encoidng='utf-8' when opening fn in FeatureTable._read_bases. On Windows, the default encoding isn't utf-8 which causes the following error:
UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 970: character maps to <undefined>` error when running `epi = epitran.Epitran("eng-Latn")

This occurs when initializing Epitran with epi = epitran.Epitran("eng-Latn")

@DRobinson4105
Copy link
Author

@dmort27 Please review and let me know if there is anything I need to change

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.

UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 970: character maps to <undefined>

1 participant