diff -ru weechat-0.2.6.3.orig/config.h.in weechat-0.2.6.3/config.h.in
--- weechat-0.2.6.3.orig/config.h.in	2009-06-30 14:01:41.000000000 +0100
+++ weechat-0.2.6.3/config.h.in	2009-06-30 14:37:31.000000000 +0100
@@ -364,8 +367,6 @@
 
 #undef PLUGINS
 
-#undef PLUGIN_ASPELL
-
 #undef PLUGIN_CHARSET
 
 #undef PLUGIN_LUA
@@ -376,6 +377,8 @@
 
 #undef PLUGIN_RUBY
 
+#undef PLUGIN_SPELL
+
 #undef PREFIX
 
 /* Define if <inttypes.h> exists and defines unusable PRI* macros. */
diff -ru weechat-0.2.6.3.orig/configure.in weechat-0.2.6.3/configure.in
--- weechat-0.2.6.3.orig/configure.in	2009-06-30 14:01:41.000000000 +0100
+++ weechat-0.2.6.3/configure.in	2009-06-30 14:36:47.000000000 +0100
@@ -98,7 +98,7 @@
 AH_VERBATIM([PLUGIN_PYTHON], [#undef PLUGIN_PYTHON])
 AH_VERBATIM([PLUGIN_RUBY], [#undef PLUGIN_RUBY])
 AH_VERBATIM([PLUGIN_LUA], [#undef PLUGIN_LUA])
-AH_VERBATIM([PLUGIN_ASPELL], [#undef PLUGIN_ASPELL])
+AH_VERBATIM([PLUGIN_SPELL], [#undef PLUGIN_SPELL])
 AH_VERBATIM([PLUGIN_CHARSET], [#undef PLUGIN_CHARSET])
 AH_VERBATIM([HAVE_GNUTLS], [#undef HAVE_GNUTLS])
 AH_VERBATIM([HAVE_FLOCK], [#undef HAVE_FLOCK])
@@ -119,7 +119,7 @@
 AC_ARG_WITH(lua-inc,        [  --with-lua-inc=DIR,       Lua include files are in DIR (default=autodetect)],lua_inc=$withval,lua_inc='')
 AC_ARG_WITH(lua-lib,        [  --with-lua-lib=DIR,       Lua library files are in DIR (default=autodetect)],lua_lib=$withval,lua_lib='')
 AC_ARG_WITH(lua-suffix,     [  --with-lua-suffix=ARG     Lua is suffixed with ARG (default=autodetect)],lua_suffix=$withval,lua_suffix='')
-AC_ARG_ENABLE(aspell,       [  --disable-aspell          Turn off Aspell plugin (default=compiled if found)],enable_aspell=$enableval,enable_aspell=yes)
+AC_ARG_ENABLE(spell,        [  --disable-spell           Turn off spelling plugin (default=compiled if found)],enable_spell=$enableval,enable_spell=yes)
 AC_ARG_ENABLE(charset,      [  --disable-charset         Turn off Charset plugin (default=compiled if found)],enable_charset=$enableval,enable_charset=yes)
 AC_ARG_WITH(doc_xsl_prefix, [  --with-doc-xsl-prefix=DIR Docbook html/chunk.xsl is in DIR (default=autodetect)],doc_xsl_prefix=$withval,doc_xsl_prefix='')
 AC_ARG_WITH(debug,          [  --with-debug              Debugging: 0=no debug, 1=debug compilation, 2=debug compilation + verbose msgs (default=1)],debug=$withval,debug=1)
@@ -270,7 +270,7 @@
     enable_python="no"
     enable_ruby="no"
     enable_lua="no"
-    enable_aspell="no"
+    enable_spell="no"
     enable_charset="no"
 fi
 
@@ -548,35 +548,40 @@
 fi
 
 # ------------------------------------------------------------------------------
-#                                   aspell
+#                                   spelling
 # ------------------------------------------------------------------------------
 
-if test "x$enable_aspell" = "xyes" ; then
-    ASPELL_CFLAGS=""
-    ASPELL_LFLAGS=""
-
-    AC_CHECK_HEADER(aspell.h,ac_found_aspell_header="yes",ac_found_aspell_header="no")
-    AC_CHECK_LIB(aspell,new_aspell_speller,ac_found_aspell_lib="yes",ac_found_aspell_lib="no")
-
-    AC_MSG_CHECKING(for aspell headers and librairies)    
-    if test "x$ac_found_aspell_header" = "xno" -o "x$ac_found_aspell_lib" = "xno" ; then
-       AC_MSG_RESULT(no)
-       AC_MSG_WARN([
+if test "x$enable_spell" = "xyes" ; then
+    # Check ENCHANT is available
+    PKG_CHECK_MODULES(ENCHANT, [enchant], [CFLAGS="$CFLAGS -DUSE_ENCHANT"], 
+    # otherwise Check ASPELL is available
+    [
+        ASPELL_CFLAGS=""
+        ASPELL_LFLAGS=""
+
+        AC_CHECK_HEADER(aspell.h,ac_found_aspell_header="yes",ac_found_aspell_header="no")
+        AC_CHECK_LIB(aspell,new_aspell_speller,ac_found_aspell_lib="yes",ac_found_aspell_lib="no")
+
+        AC_MSG_CHECKING(for aspell headers and librairies)    
+        if test "x$ac_found_aspell_header" = "xno" -o "x$ac_found_aspell_lib" = "xno" ; then
+           AC_MSG_RESULT(no)
+           AC_MSG_WARN([
 *** Aspell headers and/or libraries couldn't be found in your system.
 *** Try to install them with your software package manager.
 *** WeeChat will be built without Aspell support.])
-       enable_aspell="no"
-       not_found="$not_found aspell"
-    else
-	AC_MSG_RESULT(yes)
-	ASPELL_LFLAGS="$ASPELL_LFLAGS -laspell"
-    fi
+           enable_spell="no"
+           not_found="$not_found spell"
+        else
+            AC_MSG_RESULT(yes)
+            ASPELL_LFLAGS="$ASPELL_LFLAGS -laspell"
+        fi
+    ])
 fi
 
-if test "x$enable_aspell" = "xyes" ; then
+if test "x$enable_spell" = "xyes" ; then
     AC_SUBST(ASPELL_CFLAGS)
     AC_SUBST(ASPELL_LFLAGS)
-    AC_DEFINE(PLUGIN_ASPELL)
+    AC_DEFINE(PLUGIN_SPELL)
 fi
 
 # ------------------------------------------------------------------------------
@@ -614,7 +619,7 @@
         enable_python="no"
         enable_ruby="no"
         enable_lua="no"
-	enable_aspell="no"
+	enable_spell="no"
         enable_charset="no"
         not_found="$not_found plugins"
     fi
@@ -813,7 +818,7 @@
 AM_CONDITIONAL(PLUGIN_PYTHON,  test "$enable_python" = "yes")
 AM_CONDITIONAL(PLUGIN_RUBY,    test "$enable_ruby" = "yes")
 AM_CONDITIONAL(PLUGIN_LUA,     test "$enable_lua" = "yes")
-AM_CONDITIONAL(PLUGIN_ASPELL,  test "$enable_aspell" = "yes")
+AM_CONDITIONAL(PLUGIN_SPELL,   test "$enable_spell" = "yes")
 AM_CONDITIONAL(PLUGIN_CHARSET, test "$enable_charset" = "yes")
 AM_CONDITIONAL(HAVE_GNUTLS,    test "$enable_gnutls" = "yes")
 AM_CONDITIONAL(HAVE_FLOCK,     test "$enable_flock" = "yes")
@@ -918,7 +923,7 @@
 echo "              Python plugin....... : $enable_python $PYTHON_STATUS"
 echo "              Ruby plugin......... : $enable_ruby $RUBY_STATUS"
 echo "              Lua plugin.......... : $enable_lua $LUA_STATUS"
-echo "              Aspell plugin....... : $enable_aspell"
+echo "              Spelling plugin..... : $enable_spell"
 echo "              Charset plugin...... : $enable_charset"
 echo "Compile with debug info........... : $msg_debug_compiler"
 echo "              Backtrace........... : $enable_backtrace"
diff -ru weechat-0.2.6.3.orig/src/plugins/aspell/Makefile.am weechat-0.2.6.3/src/plugins/aspell/Makefile.am
--- weechat-0.2.6.3.orig/src/plugins/aspell/Makefile.am	2009-06-30 14:01:42.000000000 +0100
+++ weechat-0.2.6.3/src/plugins/aspell/Makefile.am	2009-06-30 14:45:24.000000000 +0100
@@ -14,7 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-INCLUDES = -DLOCALEDIR=\"$(datadir)/locale\" $(ASPELL_CFLAGS) 
+INCLUDES = -DLOCALEDIR=\"$(datadir)/locale\" $(ASPELL_CFLAGS) $(ENCHANT_CFLAGS)
 
 libdir = ${weechat_libdir}/plugins
 
@@ -22,4 +22,4 @@
 
 aspell_la_SOURCES = weechat-aspell.h weechat-aspell.c
 aspell_la_LDFLAGS = -module
-aspell_la_LIBADD  = $(ASPELL_LFLAGS)
+aspell_la_LIBADD  = $(ASPELL_LFLAGS) $(ENCHANT_LIBS)
diff -ru weechat-0.2.6.3.orig/src/plugins/aspell/weechat-aspell.c weechat-0.2.6.3/src/plugins/aspell/weechat-aspell.c
--- weechat-0.2.6.3.orig/src/plugins/aspell/weechat-aspell.c	2009-06-30 14:01:42.000000000 +0100
+++ weechat-0.2.6.3/src/plugins/aspell/weechat-aspell.c	2009-06-30 15:27:01.000000000 +0100
@@ -30,6 +30,9 @@
 aspell_speller_t *aspell_plugin_speller = NULL;
 aspell_config_t *aspell_plugin_config = NULL;
 aspell_options_t aspell_plugin_options;
+#ifdef USE_ENCHANT
+EnchantBroker *broker = NULL;
+#endif
 
 t_weechat_plugin *weechat_aspell_plugin = NULL;
 
@@ -68,8 +71,8 @@
     {
 	if (s->speller) 
 	{
-	    aspell_speller_save_all_word_lists (s->speller);
-	    delete_aspell_speller (s->speller);
+//TODO	    aspell_speller_save_all_word_lists (s->speller);
+	    enchant_broker_free_dict(broker, s->speller);
 	}
 	if (s->lang)
 	    free(s->lang);
@@ -104,6 +107,13 @@
 weechat_aspell_speller_list_add (char *lang)
 {
     aspell_speller_t *s;
+#ifdef USE_ENCHANT
+    EnchantDict *ret;
+
+    ret = enchant_broker_request_dict (broker, lang);
+    if (!ret)
+	return 0;
+#else
     AspellConfig *config;
     AspellCanHaveError *ret;
 
@@ -122,6 +132,7 @@
 	delete_aspell_can_have_error (ret);
 	return 0;
     }
+#endif
 
     /* create and add a new speller cell */
     s = weechat_aspell_new_speller();
@@ -135,9 +146,12 @@
     
     s->lang = strdup (lang);
     s->refs = 1;
+#ifdef USE_ENCHANT
+    s->speller = ret;
+#else
     s->speller = to_aspell_speller (ret);
-    
     delete_aspell_config (config);
+#endif
     
     return 1;
 }
@@ -379,6 +393,9 @@
 int
 weechat_aspell_speller_exists (char *lang) 
 {
+#ifdef USE_ENCHANT
+    return enchant_broker_dict_exists(broker, lang);
+#else
     struct AspellConfig *config;
     AspellDictInfoList *l;
     AspellDictInfoEnumeration *el;
@@ -404,8 +421,24 @@
     delete_aspell_config (config);
 
     return r;
+#endif
 }
 
+#ifdef USE_ENCHANT
+void EnchantDictDescribe(const char * const lang_tag,
+    const char * const provider_name,
+    const char * const provider_desc,
+    const char * const provider_file,
+    void * user_data)
+{
+    (void)provider_name;
+    (void)provider_desc;
+    (void)provider_file;
+    (void)user_data;
+    weechat_aspell_plugin->print (weechat_aspell_plugin, NULL, NULL, "[%s]  - %s", _PLUGIN_NAME, lang_tag);
+}
+#endif
+
 /*
  * weechat_aspell_speller_list_dicts : 
  *      list all aspell dict installed on system and display them
@@ -413,20 +446,26 @@
 void
 weechat_aspell_speller_list_dicts (void) 
 {
+#ifndef USE_ENCHANT
     char *country, *lang, *p;
     char buffer[192];
+
     struct AspellConfig *config;
     AspellDictInfoList *l;
     AspellDictInfoEnumeration *el;
-    const AspellDictInfo *di;    
+    const AspellDictInfo *di;
     
     config = new_aspell_config();
     l = get_aspell_dict_info_list (config);
     el = aspell_dict_info_list_elements (l);    
     di = NULL;
-    
+#endif 
+
     weechat_aspell_plugin->print (weechat_aspell_plugin, NULL, NULL, "[%s] *** dictionnaries list :", _PLUGIN_NAME);
 
+#ifdef USE_ENCHANT
+    enchant_broker_list_dicts(broker, EnchantDictDescribe, NULL);
+#else
     while (( di = aspell_dict_info_enumeration_next (el)))
     {
 	country = NULL;
@@ -467,6 +506,7 @@
 
     delete_aspell_dict_info_enumeration (el);    
     delete_aspell_config (config);
+#endif
 }
 
 /*
@@ -526,9 +566,14 @@
 
     c = weechat_aspell_config_list_search (server, channel);
     if (c) {
+#ifdef USE_ENCHANT
+	enchant_dict_add(
+		c->speller->speller, (const char *) word, strlen(word));
+#else
 	if (aspell_speller_add_to_personal (
 		c->speller->speller, (const char *) word, strlen(word)) == 1)
 	    ret = 1;
+#endif
     }
     
     if (ret)
@@ -1296,7 +1341,11 @@
 			{
 			    if (!weechat_aspell_nick_in_channel (clword, server, channel))
 			    {
+#ifdef USE_ENCHANT
+				if (enchant_dict_check(c->speller->speller, clword, strlen(clword)) != 0)
+#else
 				if (aspell_speller_check (c->speller->speller, clword, -1) != 1)
+#endif
 				{
 				    if (count == 0)
 					weechat_aspell_plugin->input_color (weechat_aspell_plugin, 0, 0, 0);
@@ -1355,6 +1404,11 @@
 	      "\n"
 	      " *NB : input line beginning with a '/' is not checked\n",
 	      _PLUGIN_OPTION_WORD_SIZE);
+
+#ifdef USE_ENCHANT
+    /* acquire enchant broker */
+    broker = enchant_broker_init();
+#endif
     
     weechat_aspell_plugin->cmd_handler_add (weechat_aspell_plugin, "aspell",
 					    "Aspell Plugin configuration",
@@ -1409,4 +1463,9 @@
 	c = c->next_config;
 	weechat_aspell_free_config (c);
     }
+
+#ifdef USE_ENCHANT
+    /* release enchant broker */
+    enchant_broker_free (broker);
+#endif
 }
diff -ru weechat-0.2.6.3.orig/src/plugins/aspell/weechat-aspell.h weechat-0.2.6.3/src/plugins/aspell/weechat-aspell.h
--- weechat-0.2.6.3.orig/src/plugins/aspell/weechat-aspell.h	2009-06-30 14:01:42.000000000 +0100
+++ weechat-0.2.6.3/src/plugins/aspell/weechat-aspell.h	2009-06-30 14:51:26.000000000 +0100
@@ -21,7 +21,11 @@
 #ifndef WEECHAT_ASPELL__H
 #define WEECHAT_ASPELL__H 1
 
-#include <aspell.h>
+#ifdef USE_ENCHANT
+#	include <enchant.h>
+#else
+#	include <aspell.h>
+#endif
 
 #define _PLUGIN_NAME    "Aspell"
 #define _PLUGIN_VERSION "0.1"
@@ -39,7 +43,11 @@
 
 typedef struct aspell_speller_t
 {
+#ifdef USE_ENCHANT
+    EnchantDict *speller;
+#else
     AspellSpeller *speller;
+#endif
     char *lang;
     int refs;
 
diff -ru weechat-0.2.6.3.orig/src/plugins/Makefile.am weechat-0.2.6.3/src/plugins/Makefile.am
--- weechat-0.2.6.3.orig/src/plugins/Makefile.am	2009-06-30 14:01:41.000000000 +0100
+++ weechat-0.2.6.3/src/plugins/Makefile.am	2009-06-30 14:33:45.000000000 +0100
@@ -35,7 +35,7 @@
 script_dir = scripts
 endif
 
-if PLUGIN_ASPELL
+if PLUGIN_SPELL
 aspell_dir = aspell
 endif
 
