GNU bug report logs -
#52179
Highlighting a word in `ispell' using `enchant'
Previous Next
Full log
Message #11 received at 52179 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Tor Kringeland <tor.a.s.kringeland <at> ntnu.no>
>> Date: Mon, 29 Nov 2021 15:44:39 +0100
>>
>> Using `ispell' with `enchant' on macOS yields the following problem. If
>> a word contains some non-ASCII character, said character will not be
>> considered part of the word and will split it (like a digit would). For
>> example in "naïve" both "na" and "ve" are considered two words. This
>> does not happen if I use `aspell' instead of `enchant', and if I run
>>
>> echo -n "naïve" | enchant-2 -a
>>
>> it registers that this is one word, and that it is valid (using an
>> English dictionary).
>>
>> I'm using Enchant version 2.3.1 and an Emacs 29 build from 24 November
>> on macOS Catalina.
>
> Which dictionary do you use, and what encoding does that dictionary
> require?
In Emacs, the relevant entry in `ispell-dictionary-alist' is
("en" "[[:alpha:]]" "[^[:alpha:]]" "" t nil nil utf-8)
I installed `aspell' and `enchant' from Homebrew. The installation of
`aspell' included a bunch of dictionaries downloaded from gnu.org. In
particular, the "en" dictionary is downloaded from [1]. It is in some
kind of binary format after installation (see [2] for details).
The weird part is that it works fine in a command line, and switching
`ispell-program-name' to use `aspell' fixes the issue, so the problem
seems to be somehow in how Emacs interacts with the `enchant-2' binary.
It's doing the same for non-ASCII characters as one would expect from
numbers: the string "one0two" is valid, as "one" and "two" are treated
as separate words and "0" is ignored.
- [1] https://ftp.gnu.org/gnu/aspell/dict/en/aspell6-en-2018.04.16-0.tar.bz2
- [2] https://github.com/Homebrew/homebrew-core/blob/master/Formula/aspell.rb
This bug report was last modified 3 years and 22 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.