Subject: Re: bug#11200: 24.0.95; ispell.el sets incorrect encoding for the default dictionary

From: Agustin Martin <[email-masked]>
Date: Mon, 16 Apr 2012 19:05:01 +0200

On Sun, Apr 08, 2012 at 12:31:55PM +0300, Eli Zaretskii wrote:
> In ispell.el we see:
> 
>   (defvar ispell-dictionary-base-alist
>     '((nil
>        ;; The default dictionary.  It may be English.aff, or any other
>        ;; dictionary depending on locale and such things.  We should probably
>        ;; ask ispell what dictionary it's using, but until we do that, let's
>        ;; just use an approximate regexp.
>        "[[:alpha:]]" "[^[:alpha:]]" "[']" nil ("-B") nil iso-8859-1)
> 
> The iso-8859-1 part is not the optimal choice for aspell and hunspell.
> These spell-checkers support UTF-8 encoding, so using utf-8 here will
> DTRT in a much larger number of locales.  With iso-8859-1, any
> non-Latin locale will require the user to customize
> ispell-local-dictionary-alist, when there's no real reason for forcing
> them do that.
> 
> Please include some simple logic to use utf-8 with the default
> dictionary, when the speller is aspell or hunspell.

Committed change to use utf-8 for recent aspell or hunspell together with
the change to use [:alpha:] if available. Closing bug report.

By the way, since global dicts will always use [:alpha:] in Emacs, I will
revert above `ispell-dictionary-base-alist' definition to the XEmacs
friendly original version. Should have no effect at all for Emacs.

Thanks for your hunspell tests and general feedback.

-- 
Agustin