Re: Special characters in a custom dictionary will break the spell check.

Kevin Atkinson <[email protected]> Sat, 7 Jul 2012 05:14:50 -0400 (EDT)
Newsgroups gmane.comp.gnu.aspell.user
Message-ID <[email protected]>
On Fri, 6 Jul 2012, Stanislas Rolland wrote:

On second reading...

> I am encountering this same problem: trying to add a word that contains a 
> special character into a personal dictionary gives an error like:
>
> @(#) International Ispell Version 3.1.20 (but really Aspell 0.60.3)
> Error: The word "erf?rt" is invalid. The character '?' (U+3F) may not appear 
> in the middle of a word.

Exactly what command are you using to add a word to the personal dictionary? 
They are multiple ways to add a word list to the personal dictionary.

> The word is utf-8-encoded into a file that is piped to the Aspell command. The 
> command includes the --encoding='utf-8' option. The personal dictionary 
> file also specifies utf-8 as encoding, and if I add the word manually to this 
> dictionary, it is correctly taken into account when spell checking is 
> done.

Sorry missed that the first time around.

> I can't find any Aspell command that would allow to retrieve the character 
> set of the main dictionary, and perhaps convert the input into that 
> character set before submitting it to Aspell.

Use "aspell config data-dir" and then look for the language date file named 
<lang tag>.dat.  For example, english will be "en.dat".

You can also just add words manually, I do not consider this a hack.

-Kevin