[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
how to get hunspell to accept umlauts in English (or, what is ispell-dic
From: |
Gijs Hillenius |
Subject: |
how to get hunspell to accept umlauts in English (or, what is ispell-dictionary-alist?) |
Date: |
Wed, 08 Dec 2010 15:15:34 -0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Hi
I've been struggling the past few days with switching from emacs and
aspell to emacs and hunspell. I think I run into some pesky unicode
issues .. and a lack of understanding it
Here is what I cooked up so far. You'll notice I mostly will switch
between checking the spelling of Dutch texts and English texts...
,----
|
| (require 'rw-language-and-country-codes)
| (require 'rw-ispell)
| (require 'rw-hunspell)
| (setq rw-hunspell-default-dictionary "nl_NL"
| rw-hunspell-dicpath-list (quote ("/usr/share/hunspell"))
| rw-hunspell-make-dictionary-menu t
| rw-hunspell-use-rw-ispell t
| ispell-program-name "hunspell")
| (setq ispell-extra-args '("-a" "-i" "utf-8") ;; probably not needed
| ispell-dictionary-alist '((nil ; my default is Dutch
| "[A-Za-zçéêèóôòæøåÇÉÊÈÓÔÒÆØÅ]"
| "[^A-Za-zçéêèóôòæøåÇÉÊÈÓÔÒÆØÅ] " "[']" t ("-d" "nl_NL" "-i"
| "utf-8") nil utf-8)
| ("british" ; British English
| "[A-Za-zçéêèóôòæøåÇÉÊÈÓÔÒÆØÅ]"
| "[^A-Za-zçéêèóôòæøåÇÉÊÈÓÔÒÆØÅ]" "[']" t ("-d" "en_GB" "-i"
| "utf-8") nil utf-8)))
`----
I gleaned this from http://www.emacswiki.org/emacs/InteractiveSpell and
other sources on the web
BUT
the ispell-dictionary-alist are still a bit of a puzzle to me. The above
ones are gambles... I don't quite understand the documentation.
Not adding the above lines give me the following errors:
Ispell and its process have different character maps
or
Ispell error: UTF-8 encoding error. Missing continuation byte in
0. character position:
These errors do not occur when using hunspell outside of emacs...
However, *including* these lines will also give me errors, with hunspell
giving up the /first/ time but continuing a _second_ time..
What I need is to get the combination of hunspell & emacs to understand
*all* kinds of characters. I might include words/names such as: Levanič
and Matevž and Rönnberg and Jyväskylä and Riigi and Infosüsteemid and
Fővárosi and Bíróság and Kriašova and Schießl, and I'm looking forward
to adding for instance Burmese characaters too, at some point :-)
So, do I need to keep adding new characters like ä š ž č ß ü to the
ispell-dictionary-alist(s) ? Why are some users defining a line
speciallyt for Norwegian, or for Lithuanian, or for German? Or is there
some kind of catch all?
--
Boy is my face red.
-- Satan after realizing Bart isn't due to arrive yet,
"Bart Gets Hit by a Car"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- how to get hunspell to accept umlauts in English (or, what is ispell-dictionary-alist?),
Gijs Hillenius <=