How to use Unicode in aspell dictionary?

一笑奈何 提交于 2020-01-02 18:18:19

问题


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?


回答1:


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


来源:https://stackoverflow.com/questions/39606346/how-to-use-unicode-in-aspell-dictionary

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!