Skip to Content.
Sympa Menu

texmacs-users - Re: [TeXmacs] spell check

Subject: mailing-list for TeXmacs Users

List archive

Re: [TeXmacs] spell check


Chronological Thread 
  • From: François Poulain <address@hidden>
  • To: address@hidden
  • Subject: Re: [TeXmacs] spell check
  • Date: Mon, 2 Apr 2012 15:01:35 +0200

Le Mon, 2 Apr 2012 13:29:17 +0200,
François Poulain <address@hidden> a écrit :

> I am able to reproduce the bug. The printed "universitÃă" is just an
> erroneous utf8 string interpreted as Cork. I don't know which encoding
> is sent to aspell, but it seems to be a wrong one.

Here is the problem. I think TeXmacs sent (in the past) datas in latin1
encoding. However, most of GNU/Linux distributions have nowadays
migrated to utf8. Then, since the locale is set to utf8, aspell want to
communicate in utf8.

Here is a hot fix to use aspell (not tested with ispell).

The reason why aspell currently works with french is not clear for me.

Anyway, is there *any* reason to use ispell nowaday ?

I ask this because this code beeing old, the dependency to ispell is
normal, but we should migrate to aspell. Aspell is maintained ; not
ispell. Aspell dictionaries management is better than ispell's one. As
an example, whereas ispell comes with a fixed list of dictionaries and
that this list is hardcoded in TeXmacs, aspell comes with
a plenty of dictionaries, handling different flavors of the usage
of all language. Then it is possible for some GNU/Linux distribution
to do not have an alias for ispell dictionary's name; only the list
of all flavors. Therefore, launching aspell -d '<language>' on such a
configuration does not work.

This is what I seen with Andrey about russian language on Gentoo.

Also, aspell encoding options are better than ispell's one.

Currently, the code try to work with these two softwares, but this is
a sink for bad behaviors. And AFAIK, no one use ispell anymore.

So, I propose to migrate the code to aspell, with a better language
management, with an optional dictionary managment and to use unicode
for communication. This will greatly simplify the plugin.

François

--
François Poulain <address@hidden>
diff --git a/src/Plugins/Ispell/ispell.cpp b/src/Plugins/Ispell/ispell.cpp
index eb5d21c..be23483 100644
--- a/src/Plugins/Ispell/ispell.cpp
+++ b/src/Plugins/Ispell/ispell.cpp
@@ -166,7 +166,9 @@ ispell_dictionary (string lang) {
 string
 ispell_extra_args (string lan) {
   if (lan == "german")
-    return " -T latin1";
+    return " -T latin1 ";
+  else if (lan == "italian")
+    return " --encoding=iso-8859-1 ";
   else
     return "";
 }



Archive powered by MHonArc 2.6.19.

Top of Page