[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [h-e-w] Hunsepll in Emacs - charset error for Swedish dictionary

From: arthur miller
Subject: Re: [h-e-w] Hunsepll in Emacs - charset error for Swedish dictionary
Date: Tue, 8 Apr 2014 17:20:06 +0200

> Date: Tue, 8 Apr 2014 18:06:03 +0300
> From: address@hidden
> Subject: Re: [h-e-w] Hunsepll in Emacs - charset error for Swedish dictionary
> To: address@hidden
> CC: address@hidden
> > From: arthur <address@hidden>
> > Date: Tue, 8 Apr 2014 03:58:31 +0000 (UTC)
> >
> > I have finally managaed to get Emacs + Hunspell to work on Windows (should a
> > spellchecker really be this difficult to get up running????).
> I will try to answer that question on emacs-devel (FWIW, I didn't have
> such hard time setting up hunspell).
> > It works fine for american enligsh dictionary (en_US), but I can't get it to
> > work for swedish.
> >
> > I am getting "Ispell and its process have different character maps" all the
> > time.
> >
> > I am sure dictionary is in iso-8859-1 encoding as well as my buffer,
> Try using utf-8 instead of iso-8859-1. I don't think the encoding of
> the dictionary matters (hunspell will convert if needed). You should
> try using utf-8 with hunspell by default.

I did! Before I posted - I used email-lists as a last resort.

I have tryed with utf-8 everywhere where it could matter, and I have also tryed
iso-8859-1-dos . I have try to instruct Emacs to use for LANG as in sv_SE.iso8859-1-dos,
and so on.

I have just tryed it again - it does no changes at all. Here are setting I used with utf-8 instead:

(after 'ispell
  (message "loading spellchecker")
  (defvar *load-start* (current-time))
  (defun anarcat/time-to-ms (time)
    (+ (* (+ (* (car time) (expt 2 16)) (car (cdr time))) 1000000) (car (cdr (cdr time)))))

  (add-to-list 'ispell-dictionary-alist '(("svenska"
                       ("-d" "sv_SE")
                       ("-B" "-d" "sv_SE")
                       ("-d" "en_US")

  (setq ispell-local-dictionary-alist ispell-dictionary-alist)
  (setq ispell-hunspell-dictionary-alist ispell-dictionary-alist)
  (setq ispell-dictionary "english")
  (setq-default ispell-program-name "hunspell")
  (setq ispell-extra-args '("-i" "utf-8"))
  (global-set-key (kbd "C-c d") 'switch-dictionary-sv-en))

And settings for Emacs to use utf-8

(set-language-environment 'utf-8)
(setq locale-coding-system 'utf-8)
(set-default-coding-systems 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-selection-coding-system 'utf-8)
(prefer-coding-system 'utf-8)

> (Btw: where did you get that Swedish dictionary?)

Files are from OpenOffice repository:

I have put a small blogg about this at

Thanks for help!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]