aspell-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Aspell-user] Special characters in a custom dictionary will break t


From: Stanislas Rolland
Subject: Re: [Aspell-user] Special characters in a custom dictionary will break the spell check.
Date: Sat, 07 Jul 2012 10:11:50 -0400
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1

Hi Kevin,

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 command was:
cat '/home/.../someTempFile' | /usr/bin/aspell -a --mode=none --home-dir='/home/.../directoryOfPersonalDictionary' --lang='en' --encoding='utf-8'
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".

This is exactly what I did to work around this issue:
- before submitting additions to the personal word list or to the personal replacement pairs, access the main dictionary currently in use and retrieve the encoding specified in the file; - convert the additions to the personal word list or to the personal replacement pairs to the encoding of the main dictionary;
- specify this encoding in the Aspell command, rather than utf-8.

The above will work only if the personal dictionaries are utf-8-encoded. If not, Aspell will complain against invalid characters in the personal dictionaries when spell checking is done. Therefore, before submitting any request to Aspell, read the personal dictionary files and ensure that the encoding option is set to utf-8. If not, set the option to utf-8 and update the files.

(Ref: http://forge.typo3.org/issues/38653)

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

That is not really possible, as the system may be used by hundreds of users.

Regards,

Stanislas Rolland
TYPO3 Core Team Member

TYPO3 .... inspiring people to share!
Get involved: http://typo3.org





reply via email to

[Prev in Thread] Current Thread [Next in Thread]