如何在aspell词典中使用Unicode? [英] How to use Unicode in aspell dictionary?
本文介绍了如何在aspell词典中使用Unicode?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用aspell
检查文本中的拼写.我有一个自定义词典,但有例外.它们全为ASCII,但一个字为Unicode(foo.en.pws
):
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
然后,我跑步:
cat x.txt | aspell -a --encoding=utf-8 -p ./foo.en.pws
我得到了:
Error: ./foo.en.pws: The word "Bárbara" is invalid.
The character '�' (U+A1) may not appear in the middle of a word.
我该怎么办?
推荐答案
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
这篇关于如何在aspell词典中使用Unicode?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文