unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* RE: [h-e-w] Hunsepll in Emacs - charset error for Swedish dictionary
       [not found]     ` <8338hn7q6m.fsf@gnu.org>
@ 2014-04-08 16:24       ` arthur miller
  0 siblings, 0 replies; only message in thread
From: arthur miller @ 2014-04-08 16:24 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel@gnu.org

[-- Attachment #1: Type: text/plain, Size: 4504 bytes --]



> Date: Tue, 8 Apr 2014 19:15:45 +0300
> From: eliz@gnu.org
> Subject: Re: [h-e-w] Hunsepll in Emacs - charset error for Swedish dictionary
> To: arthur.miller@live.com
> CC: help-emacs-windows@gnu.org
> 
> > From: arthur miller <arthur.miller@live.com>
> > Date: Tue, 8 Apr 2014 17:20:06 +0200
> > Cc: "help-emacs-windows@gnu.org" <help-emacs-windows@gnu.org>
> > 
> > > 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"
> >                        "[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 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: http://archive.services.openoffice.org/pub/mirror/OpenOffice.org/contrib/dictionaries/
> 
> Please try with Emacs 24.3 first.  With that version, I succeed in
> using the Swedish dictionary above by doing the following:
> 
>   emacs -Q
>   (setq ispell-program-name
>       (locate-file "hunspell" exec-path exec-suffixes 'file-executable-p))
>   (setq
>     ispell-local-dictionary-alist
>     '(("svenska"
>           "[A-ZÖÄÅa-zöäå]"
> 	  "[^A-ZÖÄÅa-zöäå]"
> 	  "[']"
> 	  nil
> 	  ("-d" "sv_SE")
> 	  t
> 	  utf-8)))
> 
>    C-x h
>    M-x eval-region RET
>    M-x ispell-change-dictionary RET svenska RET
> 
> Now go to some word in the buffer and type M-$.  You should see
> suggestions for correcting the "typo".
> 
> The above assumes hunspell.exe is on PATH.  If it isn't, modify the
> first setq to specify a full absolute file name of hunspell.exe.
> 
> If the above doesn't work for you, then please try the hunspell.exe
> binaries from the ezwinports site.  When I ported Hunspell to Windows,
> I fixed several bugs in it; it is possible that the sources you
> compiled don't include those fixes, in which case the problems you see
> are expected.

Yepp, you are right. I haven't fixed any bugz in Hunspell, I have just compiled it. Actually one small
configuration thing just to get it to compile.  I have tested now my own hunspell.exe  and -Q options, but
neither of Emacses works, but with your Hunsepll both do, so it must patches you have applied.

Once again - thanks for pointing me to ezwinport.

best regards
/a
 		 	   		  

[-- Attachment #2: Type: text/html, Size: 5522 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-04-08 16:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <loom.20140408T054252-659@post.gmane.org>
     [not found] ` <83fvln7tes.fsf@gnu.org>
     [not found]   ` <BLU183-W517D9AA3BF4C7E03241808966B0@phx.gbl>
     [not found]     ` <8338hn7q6m.fsf@gnu.org>
2014-04-08 16:24       ` [h-e-w] Hunsepll in Emacs - charset error for Swedish dictionary arthur miller

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).