Aspell and Curly Quotes

Published: January 13, 2017


aspell really doesn’t like curly quotes…

$ echo "This really shouldn’t fail" | aspell list
$ echo "This really shouldn't fail" | aspell list

I ran up against this issue looking into adding a spell check featured for jekyll-pre-commit.

There are a few threads you’ll find on this issue, but most of them don’t seem to indicate any resolution…

Tue, 19 Feb 2008 10:22:17 -0800

I use aspell from within Emacs. I have some documents that are stored in utf-8 and use the unicode code points for curly quotes (8220, 8221, 8216, and 8217) rather than ASCII straight quotes. Is there any way to get aspell to recognize a curly apostrophe as a word constituent so contractions (e.g. isn’t, except where the ‘ is Unicode character 8217) are recognized as single words, correctly spelled words. At the moment it sees “isn” and complains about it.


Tue, 22 Jul 2008 19:47:34 +1200

Did anyone find a solution to this problem?


Tue, 22 Jul 2008 22:33:05 -0300

At first, I thought about adding it the special characters which can be considered part of the word, but I just tried it, and it doesn’t work. Maybe because Aspell is 8 bit only, and AFAIK the curly apostrophe is outside iso-8859-1.

I guess the only proper way of doing this is making Aspell understand both kinds of apostrophes as “synonyms”, which AFAIK would require you to file a feature request.

Leonardo Fontenelle

Some people even seem to be looking to turn off curly quotes entirely for this reason…

How do I turn off smart quotes and apostrophes in Jekyll? It is breaking my gulp spellcheck process.

I spent some time researching this issue myself, and from what I can see this best option at this point seems to be to replace the curly quotes with straight quotes (via sed) before sending to aspell as outlined here. Per the below, aspell is OK with things if you do that…

$ echo "This really shouldn’t fail" | sed "s/’/'/g" | aspell list

Per the stack overflow answer updating your dictionary is another option.

:bulb:Did you enjoy this blog post?

If so, please consider checking out my side project Domain Clamp. It's a SaaS which monitors domains and SSL certificates and sends notifications before anything expires. If you work at an agency, then you're probably not the registrant for your client's domains or the SSL certificate owner. This means you won't get expiration notifications. You don't want a client's domain or SSL certificate to expire under your watch. Believe me, I've been there.

Domain Clamp solves this problem by letting you monitor the SSL certificate and registration for any domain you'd damn please. Free accounts are available so please head on over »