#864864 hunspell: encoding error when using both en_US and ru_RU distionaries at the same time

Package:
hunspell
Source:
hunspell
Description:
spell checker and morphological analyzer (program)
Submitter:
Sergei Golovan
Date:
2017-09-27 07:57:10 UTC
Severity:
normal
#864864#5
Date:
2017-06-16 08:32:52 UTC
From:
To:
Dear Maintainer,

I've tried to check a document with both Russian and English words it it
simultaneously, and failed. Only misspelled English words were detected.

The following command shows the problem:

% hunspell -d en_US,ru_RU
Hunspell 1.4.0
ello
& ello 13 0: ell, cello, hello, Cello, ells, el lo, el-lo, ell o, Elle, Eloy,
elope, Ellison, Eliseo

прив
error - iconv: ISO8859-1 -> UTF-8
*

I don't know where huspell picks the ISO8859-1 encoding, but it seems that
it's wrong.

Using one ru_RU distionary works fine.

#864864#10
Date:
2017-06-16 11:55:45 UTC
From:
To:
Hi,

Does it also happen with current upstresm (1.6.1)? It's in experimental right now but will
be uploaded to unstable shortly after the stretch release.

Regards,

Rene

#864864#15
Date:
2017-06-16 12:37:58 UTC
From:
To:
Hi,

With 1.6 the situation is worse (but it's probably a different bug).
It doesn't report
encoding error, but it doesn't report any status at all when I'm using the ru_RU
dictionary:

% hunspell -d ru_RU,en_US
Hunspell 1.6.1
прив

It accepts the next word, replies to it if it's an English one, but
tells nothing to any
Russian letters in the input. Also, removing en_US from the command line doesn't
change much. Hunspell reacts silently on Cyrillics in input.

It was with hunspell from experimental (1.6.1-1) with hunspell-ru (1:5.2.5-1).

Cheers!

#864864#20
Date:
2017-09-27 07:56:39 UTC
From:
To:
I see the same issue with 1.6.2 from buster.

huspell reports a lot of following errors, when Russian and English
are used at the same time.
'error - iconv: ISO8859-1 -> UTF-8'

ISO8856-1 comes probably from en_US dictionary encoding.
I've tried to use Russian and German dictionaries together as well.
The same issue happens. German dictionary is using ISO8859-1 as well.

I converted en_US dictionary to UTF-8 and this fixed my problem.

cp /usr/share/hunspell/en_US.aff  /usr/share/hunspell/en_US.aff.orig
cp /usr/share/hunspell/en_US.dic  /usr/share/hunspell/en_US.dic.orig
iconv --from ISO8859-1 /usr/share/hunspell/en_US.aff.orig > /usr/share/hunspell/en_US.aff
iconv --from ISO8859-1 /usr/share/hunspell/en_US.dic.orig > /usr/share/hunspell/en_US.dic
sed -i /usr/share/hunspell/en_US.aff  's/SET ISO8859-1/SET UTF-8/'