aspell-user
[Top][All Lists]
Advanced

[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


From: Kevin Atkinson
Subject: Re: [Aspell-user] Bad ispell.el <-> aspell-0.60 interactions in utf8 environments
Date: Tue, 5 Apr 2005 13:47:09 -0600 (MDT)

On Sun, 3 Apr 2005, Agustin Martin wrote:

> (Please, cc me replies, I am not subscribed to aspell-user)

> When run in an UTF8 environment, aspell 0.60 expects utf8 text and returns
> utf8 text, so if latin1 text is piped to it, some problems appear. While
> this might sound crazy when done from the command line, that seems to be
> what happens when ispell.el pipes to aspell a text as latin1 (because the
> corresponding entry says the dict is latin1), but aspell is run in an utf8
> environment, e.g., piping the word rĂ´le (as is, in latin1 encoding) to
> aspell (as aspell -a -d british-w_accents) in a latin1 environment gives
>
> ...
>
> 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.

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.

> 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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]