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
Encoding Problem Python3 #32
Comments
Ok I can reproduce something similar. But not exactly. Here is what I have on Debian 8:
I will inquire on this later a bit later. Can you attach your ubuntu version for the record please? |
In my applications, i use
|
I see a similar problem on Fedora 26: $ python3
The above exception was the direct cause of the following exception: Traceback (most recent call last): I think “grün” should be among the suggestions, but it fails because of the encoding error. |
+1 |
Update: I tried with |
The problem still exists import hunspell
hobj = hunspell.HunSpell('/usr/share/hunspell/en_US.dic', '/usr/share/hunspell/en_US.aff')
print(hobj.suggest('Eelysa')) Related #35. By the way pyenchant doesn't have this problem, through it uses libenchant-dev instead of hunspell directly. |
Same error with 0.5.3. See mike-fabian/ibus-typing-booster#23 |
I think it's ok in master now. If someone confirm I will publish rapidly a new version on pypi |
For the record, some dic are Latin1 encoded, I try some UTF-8 first and on fail I fallback on Latin1. |
The problem seems to be fixed in current git master. |
Benoît Latinier <notifications@github.com> さんは書きました:
For the record, some dic are Latin1 encoded, I try some UTF-8 first and on fail I fallback on Latin1.
The problem seems to be fixed in current git master indeed.
…--
📧 Mike FABIAN <mike.fabian@gmx.de>
睡眠不足はいい仕事の敵だ。
|
in hunspell (0.5.3) still the same problem when using HunSpell.suggest() with German umlauts.?
Any chances to get it fixed or a working workaround? EDIT: As I only use hunspell for German and German hunspell dictionaries are known to be in latin1, i changed in hunspell.cpp at line 171
and recompiled and reinstalled with
Magically, it worked. Enter chaos! Now seriously. Is there a way to get from hunspell the encoding of the dictionary and perform a clever decoding? I am too new to python and not proficient to C to make it myself. |
@nkrot Current git master worked for me doing this: $ python3
|
@nkrot since current master solves this encoding issue, I published a new version (0.5.4 → https://pypi.python.org/pypi/hunspell/0.5.4) |
Encoding is wrong:
Instead of "narazi³" and "naraziæ" should be "narazić" and "naraził". |
I am re-opening this bug, as the solution provided is not a complete fix. |
Hey! I have a problem using hunspell with german words and I hope you can help me out.
An Example:
When I encode to utf-8 it works, but the result I get makes no sense:
This seems to be very weird, since here was done the exact same thing which apparently worked.
I use it in a Ubuntu VM with all the necessary packages installed:
The text was updated successfully, but these errors were encountered: