【问题标题】:How to use Unicode in aspell dictionary?如何在 aspell 字典中使用 Unicode?
【发布时间】:2016-09-21 10:12:42
【问题描述】:

我正在尝试使用aspell 来检查我的文本中的拼写。我有一个有例外的自定义字典。都是ASCII码,一个字是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.

我该怎么办?

【问题讨论】:

  • @IgnacioVazquez-Abrams 我把 Unicode 放在那里是为了让其他人更容易在 Google 中找到这个问题。大多数人会搜索“Unicode”而不是 UTF-8。有意义吗?

标签: linux aspell


【解决方案1】:

感谢这份文档page,我找到了一种方法。字典的第一行末尾必须有utf-8

personal_ws-1.1 en 554 utf-8
Foo
bar
Bárbara

【讨论】:

    猜你喜欢
    • 2015-08-17
    • 1970-01-01
    • 2023-03-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多