[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Aspell-user] Bad ispell.el <-> aspell-0.60 interactions in utf8 env
Re: [Aspell-user] Bad ispell.el <-> aspell-0.60 interactions in utf8 environments
Wed, 6 Apr 2005 12:56:10 +0200
On Tue, Apr 05, 2005 at 01:47:09PM -0600, Kevin Atkinson wrote:
> On Sun, 3 Apr 2005, Agustin Martin wrote:
> > This last seems what emacs do trough ispell.el, resulting in a 'Ispell and
> > its process have different charsets' error on ispell-word
> > The fix I am considering is to modify ispell.el so
> > --encoding=ispell_dict_encoding
> That will work provided that Aspell recognizes the encoding. Aspell 0.50
> is stricter than Aspell 0.60 as the exact format of the encoding string.
> For example Aspell 0.50 will only accept 'iso8859-1' while 0.60 will
> accept either 'iso-8859-1' or 'iso8859-1'. Aspell 0.60 will also accept
> the special encoding "none" to mean no conversion.
Yes, I first thought I needed some 'aspell encoding' <-> 'emacs mime-charset'
mapping when I noticed that for aspell-0.60 the interesting emacs
coding-systems work 'as is'. No problem for aspell 0.50, we are not shipping
it, and aspell-0.33 is only present in current rather outdated Debian stable
(woody), where the package containing the modified ispell.el is not present.
While I could add a better check, so this is not used for aspell-0.33 in
case somebody wants to use this modified system in woody, I strongly doubt
> The other option is to change "LC_CTYPE" to "C" or "POSIX" this will avoid
> any conversion at all. This will work with both Aspell 0.50 and Aspell
> 0.60. Aspell 0.50 ignores LC_CTYPE (and thus never converts unless
> instructed to via encoding, and even that doesn't work correctly) while
> Aspell 0.60 respects it.
> However be careful with turning conversion off. Some languages may not
> use a standard charset and thus it is best to use utf-8.
Seems to me better to trust the ispell.el coding-system, since that is how
emacs+ispell.el will send the text to aspell. For this last reason I think
this is better than just using --encoding=none or disabling LC_CTYPE. I
think all currently used dicts coding-systems (as defined in ispell.el)
are supported by aspell-0.60.
I will also mail emacs-devel about this problem.
> > is added to the aspell call (and only to the aspell call). Code for that
> > is simple, and seems to work well, but I wonder if a better fix is proposed.
> No. Other than to change Aspell not to respect LC_CTYPE which would be a
> step backwards in my view.
A minimal intervention could be to disable that only when used through a
pipe, but aspell used from ispell.el is only a single case, there are
surely other cases where that is a real step backwards. I will better use
the --encoding way, also because, as mentioned above, that will make sure
that ispell.el and aspell use the same encoding.
(P.S. I subscribed to aspell-user to make communication more fluent, no
longer need to cc me)