[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#19653: ispell misalignment with hunspell when Unicode apostrophe is
From: |
Eli Zaretskii |
Subject: |
bug#19653: ispell misalignment with hunspell when Unicode apostrophe is used |
Date: |
Thu, 22 Jan 2015 19:41:54 +0200 |
> From: Tobias Getzner <tobias.getzner@gmx.de>
> Date: Thu, 22 Jan 2015 15:40:05 +0100
>
> I’ve noticed that when ispell.el (Emacs 24.4.1) is using hunspell (v.
> 1.3.3) to spell-check a buffer containing the typographically correct
> apostrophe («’»; U+2019), ispell will error out with the message
> «ispell misalignment».
>
> The problem can be reproduced by setting ispell-program-name to
> «hunspell», and spell-checking a buffer containing the string «abc’s
> zzz». This yields the following error:
>
> > ispell-process-line: Ispell misalignment: word `zzz' point 9; probably
> > incompatible versions
I cannot reproduce this with Emacs 24.4 and Hunspell 1.3.2 (heavily
patched to fix known problems in Hunspell). You didn't provide enough
information for me to be sure I did the same as you, so here are the
possible explanations for the different experience:
. I use a different version of Hunspell, and yours has a bug.
Hunspell is known to have a problem with reporting mis-spelled
words with byte offsets, whereas Emacs expects character offsets,
so dictionaries encoded in UTF-8 cause symptoms similar to those
you report. My Hunspell is patched to avoid this problem.
. I didn't change OTHERCHARS. Frankly, I think doing this asks for
trouble, since the speller still uses the characters recorded in
the .aff file.
. You didn't tell which dictionary you used. I tried en_US and
de_DE, and none of them produced these problems. Maybe this is
specific to some dictionary you used. In particular, the encoding
of that dictionary is important vs the encoding you tell ispell.el
to use (if you customized that part).
> This seems to be a regression from 24.3, where hunspell support was
> working (with the caveat that the apostrophe had to be manually added
> to the dictionary’s «OTHERCHARS»).
Are you saying that the same version of Hunspell with the same
dictionary worked in Emacs 24.3, where Emacs 24.4 doesn't? If so,
please try to eliminate or at least minimize your ispell-related
customizations, and try again. If the problem persists, please show
the minimal set of customizations to reproduce the problem.