We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Looks like the gem expects the user to know the encoding of the dictionaries.
require 'ffi/hunspell' dict = FFI::Hunspell.dict('de_DE') # kinda surprising dict.valid?("Vergnügungseinrichtungen") #=> false # works as expected dict.valid?("Vergnügungseinrichtungen".encode("iso-8859-1")) #=> true dict.encoding #=> #<Encoding:ISO-8859-1>
To make it work, I have to paranoically recode each word like this:
dict.valid?("Vergnügungseinrichtungen".encode(dict.encoding)) #=> true
Contrast with the console utility (tested in locales en_US.utf8 and de_DE.utf8) that sorts out the encoding itself:
en_US.utf8
de_DE.utf8
> echo Vergnügungseinrichtungen | hunspell -d de_DE Hunspell 1.3.3 -
Maybe it makes sense fixing ze issue in the gem or at least commenting on it in the documentation.
Tested on debian jessie, with ruby 2.2.4p230.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Looks like the gem expects the user to know the encoding of the dictionaries.
To make it work, I have to paranoically recode each word like this:
Contrast with the console utility (tested in locales
en_US.utf8
andde_DE.utf8
) that sorts out the encoding itself:Maybe it makes sense fixing ze issue in the gem or at least commenting on it in the documentation.
Tested on debian jessie, with ruby 2.2.4p230.
The text was updated successfully, but these errors were encountered: