all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: arthur miller <arthur.miller@live.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: "emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: RE: [h-e-w] Hunsepll in Emacs - charset error for Swedish dictionary
Date: Tue, 8 Apr 2014 18:24:18 +0200	[thread overview]
Message-ID: <BLU183-W1396377866D3BE2C72A56A966B0@phx.gbl> (raw)
In-Reply-To: <8338hn7q6m.fsf@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 --]

           reply	other threads:[~2014-04-08 16:24 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <8338hn7q6m.fsf@gnu.org>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BLU183-W1396377866D3BE2C72A56A966B0@phx.gbl \
    --to=arthur.miller@live.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.