Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use Unicode in aspell dictionary?

Tags:

linux

aspell

I'm trying to use aspell to check spelling in my text. I have a custom dictionary with exceptions. They are all in ASCII, but one word is in Unicode (foo.en.pws):

personal_ws-1.1 en 554
Foo
bar
Bárbara

Then, I run:

cat x.txt | aspell -a --encoding=utf-8 -p ./foo.en.pws

And I'm getting:

Error: ./foo.en.pws: The word "Bárbara" is invalid. 
The character '�' (U+A1) may not appear in the middle of a word.

What should I do?

like image 847
yegor256 Avatar asked Sep 21 '16 01:09

yegor256


1 Answers

I found a way, thanks to this documentation page. The first line of the dictionary has to have utf-8 at the end:

personal_ws-1.1 en 554 utf-8
Foo
bar
Bárbara
like image 164
yegor256 Avatar answered Nov 13 '22 09:11

yegor256