|
From: | arthur miller |
Subject: | RE: A question about spellchecker |
Date: | Tue, 8 Apr 2014 17:39:11 +0200 |
> Date: Tue, 8 Apr 2014 18:34:05 +0300 > From: address@hidden > Subject: Re: A question about spellchecker > To: address@hidden > CC: address@hidden; address@hidden > > > From: arthur miller <address@hidden> > > Date: Tue, 8 Apr 2014 15:07:57 +0200 > > Cc: "address@hidden" <address@hidden> > > > > I have found what is problem with emacs and hunspell on my computer. > > It does not seem tounderstand charset och stream it gets back from hunspell. > > It can actually spell all words not containing swedish characters (öäå) with > > swedish dictionary. When pressing with right mouse I get a pop-up with > > word suggestions, where all swedish characters are missinterpretted. > > > > If I press M-$ (spell-word) I get message > > > > "ispell-word: Ispell and its process have different character maps" . > > > > Emacs has no problems with swedish chars in text-buffer itself, but in > > characters in stream it gets back from hunspell. > > > > I have checked that encoding of file and LANG variable all use same encoding > > as the dictionary itself. > > > > In image1 can be seen how it treats word *omvärld* (for world) . > > I am not sure if this is a bug, or I am just not aware of correct setting. I have > > tryed to google around for solution but I haven't found any good answers. > > > > I am using a development version of Emacs: > > > > GNU Emacs 24.4.50.2 (x86_64-w64-mingw32) > > > > Are bug-reports welcome since it is not official version of emacs? > > It's not a real problem. Please tell where you got that Swedish > dictionary, and please try using the UTF-8 encoding instead of 8859-1. > I answered your email on the other list, dictionaries are from OpenOffice: http://archive.services.openoffice.org/pub/mirror/OpenOffice.org/contrib/dictionaries/ I did try to use utf-8, I can copy my settings again: (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" "[A-ZÖÄÅa-zöäå]" "[^A-ZÖÄÅa-zöäå]" "[']" nil ("-d" "sv_SE") t utf-8) ("svenska8" "[A-ZÖÄÅa-zöäå]" "[^A-ZÖÄÅa-zöäå]" "[']" nil ("-B" "-d" "sv_SE") t utf-8) ("english" "[[:alpha:]]" "[^[:alpha:]]" "[']" t ("-d" "en_US") nil utf-8))) (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 for Eamcs itself to prefer 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) |
[Prev in Thread] | Current Thread | [Next in Thread] |