Aspell, Emacs and UTF-8

  • Follow


Hi,

I'm using GNU Emacs 21.4.1. I write UTF-8 encoded files, and I have no
problem with accented letters and other two-or-more-bytes chars. 

However, when I try the « flyspell-mode » (using Aspell 0.60.4 and the
french dictionary), all words containing two-bytes chars are said to
be mispelled.

When I ask for correct words, for example for the word « être », the
word « être » is proposed (i.e. the word in UTF-8 re-encoded to
ISO-8859-1 !), which is bad.

I checked the UTF-8 encoded file with command-line aspell, and it
worked. That's why I suppose that the problem lays between Emacs and
aspell.

I tried to set the variables default-process-coding-system and
process-coding-system-alist to UTF-8, without any change.

Any clue ?

-- 
Florian Dufour

Direction de l'Information Scientifique et de la Communication
Tél : 04 76 61 52 39 - Mél : Florian.Dufour@inrialpes.fr
0
Reply Florian 12/6/2005 10:14:39 AM

Florian Dufour <Florian.Dufour@inrialpes.fr> écrit :

> When I ask for correct words, for example for the word « être », the
> word « être » is proposed (i.e. the word in UTF-8 re-encoded to
> ISO-8859-1 !), which is bad.
>
> I checked the UTF-8 encoded file with command-line aspell, and it
> worked. That's why I suppose that the problem lays between Emacs and
> aspell.
>
> I tried to set the variables default-process-coding-system and
> process-coding-system-alist to UTF-8, without any change.

I found a way to solve my problem : my environment variables LANG and
LC_ALL where set to 'fr_FR.UTF-8'. I set them to 'fr_FR' using Emacs
function "setenv", and then, it works perfectly ! Did I find an Emacs
bug ?

-- 
Florian Dufour

Direction de l'Information Scientifique et de la Communication
Tél : 04 76 61 52 39 - Mél : Florian.Dufour@inrialpes.fr
0
Reply Florian 12/6/2005 10:33:10 AM


Florian Dufour <Florian.Dufour@inrialpes.fr> writes:

>> I tried to set the variables default-process-coding-system and
>> process-coding-system-alist to UTF-8, without any change.
>
> I found a way to solve my problem : my environment variables LANG and
> LC_ALL where set to 'fr_FR.UTF-8'. I set them to 'fr_FR' using Emacs
> function "setenv", and then, it works perfectly ! Did I find an Emacs
> bug ?

AFAIK coding system used to communicate with aspell/ispell is defined by
corresponding entry in ispell-dictionary-alist (and by default it is
iso-8859-1 for French). Changing locale to fr_FR (which is probably an alias
to fr_FR.ISO8859-1 or soemthing like that) makes aspell to use iso8859-1
coding too and fixes the problem; better way for utf-8 environment is to
change ispell-dictionary-alist to force Emacs talk utf-8 with aspell.

-- 
 							With regards, Roman.

Standard disclaimer: I work for them, but I don't speak for them.
0
Reply Roman 12/7/2005 3:47:08 PM

2 Replies
257 Views

(page loaded in 0.05 seconds)

Similiar Articles:













7/12/2012 1:09:55 AM


Reply: