Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to open .crf file with path containing utf-8 characters such as 'ö' #157

Open
Bringers opened this issue Jan 13, 2024 · 0 comments
Open

Comments

@Bringers
Copy link

I am using this in a project on a Swedish windows computer. For some reason windows names the admin user folder to "Administratör" (swedish for "Administrator"). I would love to rename this folder but since it is the highest admin on this PC it is tricky to rename (I have tried).

Trying to use "TTS" text to speach and they use your tagger.
There I get the following issue at

File "pycrfsuite/_pycrfsuite.pyx", line 572, in pycrfsuite._pycrfsuite.Tagger.open
UnicodeEncodeError: 'ascii' codec can't encode character '\xf6' in position 20: ordinal not in range(128)

The line calling this looks like this

self.crf_tagger.open(str(crf_tagger))

where
str(crf_tagger) evaluates to something like "C:\Users\Administratör....."

Could someone fix this? I am not confident enough to make a PR on my own here.
I am guessing that you need to introduce utf-8 support in this project somewhere. (or make it possible to configure)

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

No branches or pull requests

1 participant