diff --git a/debian/patches/1000_extra-data-searchpath.diff b/debian/patches/1000_extra-data-searchpath.diff
new file mode 100644
index 0000000..1e87800
--- /dev/null
+++ b/debian/patches/1000_extra-data-searchpath.diff
@@ -0,0 +1,229 @@
+--- a/modules/speller/default/language.cpp
++++ b/modules/speller/default/language.cpp
+@@ -84,10 +84,10 @@
+     // get_lang_info
+     //
+ 
+-    String dir1,dir2,path;
++    String dir1,dir2,dir3,path;
+ 
+-    fill_data_dir(config, dir1, dir2);
+-    dir_ = find_file(path,dir1,dir2,lang,".dat");
++    fill_data_dir(config, dir1, dir2, dir3);
++    dir_ = find_file(path,dir1,dir2,dir3,lang,".dat");
+ 
+     lang_config_ = 
+       new Config("speller-lang",
+@@ -123,7 +123,7 @@
+   
+     FStream char_data;
+     String char_data_name;
+-    find_file(char_data_name,dir1,dir2,charset_,".cset");
++    find_file(char_data_name,dir1,dir2,dir3,charset_,".cset");
+     RET_ON_ERR(char_data.open(char_data_name, "r"));
+     
+     String temp;
+@@ -209,7 +209,8 @@
+ 
+     if (charmap_ != charset_) {
+       if (file_exists(dir1 + charset_ + ".cmap") || 
+-          file_exists(dir2 + charset_ + ".cmap"))
++          file_exists(dir2 + charset_ + ".cmap") ||
++          file_exists(dir3 + charset_ + ".cmap"))
+       {
+         charmap_ = charset_;
+       } else if (data_encoding_ == charset_) {
+@@ -288,7 +289,7 @@
+ 
+       String repl_file;
+       FStream REPL;
+-      find_file(repl_file, dir1, dir2, repl, "_repl", ".dat");
++      find_file(repl_file, dir1, dir2, dir3,repl, "_repl", ".dat");
+       RET_ON_ERR(REPL.open(repl_file, "r"));
+       
+       size_t num_repl = 0;
+@@ -596,9 +597,9 @@
+   {
+     String lang = c.retrieve("lang");
+ 
+-    String dir1,dir2,path;
+-    fill_data_dir(&c, dir1, dir2);
+-    String dir = find_file(path,dir1,dir2,lang,".dat");
++    String dir1,dir2,dir3,path;
++    fill_data_dir(&c, dir1, dir2,dir3);
++    String dir = find_file(path,dir1,dir2,dir3,lang,".dat");
+ 
+     String file;
+     file += dir;
+@@ -616,13 +617,13 @@
+     String l_data = c.retrieve("lang");
+     char * l = l_data.mstr();
+ 
+-    String dir1,dir2,path;
+-    fill_data_dir(&c, dir1, dir2);
++    String dir1,dir2,dir3,path;
++    fill_data_dir(&c, dir1, dir2,dir3);
+ 
+     char * s = l + strlen(l);
+ 
+     while (s > l) {
+-      find_file(path,dir1,dir2,l,".dat");
++      find_file(path,dir1,dir2,dir3,l,".dat");
+       if (file_exists(path)) {
+         c.replace_internal("actual-lang", l);
+         return true;
+--- a/modules/speller/default/typo_editdist.cpp
++++ b/modules/speller/default/typo_editdist.cpp
+@@ -96,9 +96,9 @@
+   TypoEditDistanceInfo::get_new(const char * kb, const Config * cfg, const Language * l)
+   {
+     FStream in;
+-    String file, dir1, dir2;
+-    fill_data_dir(cfg, dir1, dir2);
+-    find_file(file, dir1, dir2, kb, ".kbd");
++    String file, dir1, dir2,dir3;
++    fill_data_dir(cfg, dir1, dir2, dir3);
++    find_file(file, dir1, dir2, dir3, kb, ".kbd");
+     RET_ON_ERR(in.open(file.c_str(), "r"));
+ 
+     ConvEC iconv;
+--- a/common/file_data_util.cpp
++++ b/common/file_data_util.cpp
+@@ -11,7 +11,8 @@
+   // FIXME: The case when there is no "/" in the master-path should not
+   //   happen since it is an internal option.  Unofficially, it can still
+   //   be set by the user.  This needs to eventually be fixed.
+-  void fill_data_dir(const Config * config, String & dir1, String & dir2) {
++  void fill_data_dir(const Config * config,
++		     String & dir1, String & dir2, String & dir3) {
+     if (config->have("local-data-dir")) {
+       dir1 = config->retrieve("local-data-dir");
+       if (dir1[dir1.size()-1] != '/') dir1 += '/';
+@@ -23,22 +24,26 @@
+       else
+         dir1 = "./";
+     }
+-    dir2 = config->retrieve("data-dir");
++    dir2 = config->retrieve("dict-dir");
+     if (dir2[dir2.size()-1] != '/') dir2 += '/';
++    dir3 = config->retrieve("data-dir");
++    if (dir3[dir3.size()-1] != '/') dir3 += '/';
+   }
+   
+   const String & find_file(String & file,
+-                           const String & dir1, const String & dir2, 
++                           const String & dir1, const String & dir2, const String & dir3,
+                            const String & name, const char * extension)
+   {
+     file = dir1 + name + extension;
+     if (file_exists(file)) return dir1;
+     file = dir2 + name + extension;
+-    return dir2;
++    if (file_exists(file)) return dir2;
++    file = dir3 + name + extension;
++    return dir3;
+   }
+ 
+   bool find_file(String & file,
+-                 const String & dir1, const String & dir2, 
++                 const String & dir1, const String & dir2, const String & dir3,
+                  const String & name, 
+                  ParmString preext, ParmString ext)
+   {
+@@ -52,18 +57,25 @@
+       if (file_exists(file)) return true;
+       file = dir2 + n;
+       if (file_exists(file)) return true;
++      file = dir3 + n;
++      if (file_exists(file)) return true;
+ 
+       n = name; n += ext;
+       file = dir1 + n;
+       if (file_exists(file)) return true;
+       file = dir2 + n;
+       if (file_exists(file)) return true;
++      file = dir3 + n;
++      if (file_exists(file)) return true;
+     }
+ 
+     file = dir1 + name;
+     if (file_exists(file)) return true;
+     file = dir2 + name;
+     if (file_exists(file)) return true;
++    file = dir3 + name;
++    if (file_exists(file)) return true;
++
+ 
+     if (try_name_only) {file = dir1 + name;}
+     else               {file = dir1 + name; file += preext; file += ext;}
+--- a/common/file_data_util.hpp
++++ b/common/file_data_util.hpp
+@@ -7,12 +7,14 @@
+ 
+ namespace acommon {
+ 
+-  void fill_data_dir(const Config *, String & dir1, String & dir2);
++  void fill_data_dir(const Config *,
++		     String & dir1, String & dir2, String & dir3);
+   const String & find_file(String & path,
+-                           const String & dir1, const String & dir2, 
++                           const String & dir1,
++			   const String & dir2, const String & dir3,
+                            const String & name, const char * extension);
+   bool find_file(String & file,
+-                 const String & dir1, const String & dir2, 
++                 const String & dir1, const String & dir2, const String & dir3,
+                  const String & name, 
+                  ParmString preext, ParmString ext);
+ }
+--- a/common/convert.cpp
++++ b/common/convert.cpp
+@@ -292,9 +292,9 @@
+     to.reset();
+     from.reset();
+     
+-    String dir1,dir2,file_name;
+-    fill_data_dir(&config, dir1, dir2);
+-    find_file(file_name,dir1,dir2,encoding,".cset");
++    String dir1,dir2,dir3,file_name;
++    fill_data_dir(&config, dir1, dir2, dir3);
++    find_file(file_name,dir1,dir2,dir3,encoding,".cset");
+ 
+     FStream data;
+     PosibErrBase err = data.open(file_name, "r");
+@@ -486,9 +486,9 @@
+   PosibErr<NormTables *> NormTables::get_new(const String & encoding, 
+                                              const Config * config)
+   {
+-    String dir1,dir2,file_name;
+-    fill_data_dir(config, dir1, dir2);
+-    find_file(file_name,dir1,dir2,encoding,".cmap");
++    String dir1,dir2,dir3,file_name;
++    fill_data_dir(config, dir1, dir2,dir3);
++    find_file(file_name,dir1,dir2,dir3,encoding,".cmap");
+     
+     FStream in;
+     PosibErrBase err = in.open(file_name, "r");
+@@ -938,13 +938,18 @@
+     if (strcmp(enc, "utf-8") == 0 
+         || strcmp(enc, "ucs-2") == 0 
+         || strcmp(enc, "ucs-4") == 0) return false;
+-    String dir1,dir2,file_name;
+-    fill_data_dir(&c, dir1, dir2);
++    String dir1,dir2,dir3,file_name;
++    fill_data_dir(&c, dir1, dir2,dir3);
+     file_name << dir1 << enc << ".cset";
+     if (file_exists(file_name)) return false;
+-    if (dir1 == dir2) return true;
++    if (dir1 != dir2){
++      file_name.clear();
++      file_name << dir2 << enc << ".cset";
++      if (file_exists(file_name)) return false;
++    }
++    if (dir1 == dir3 || dir2 == dir3) return true;
+     file_name.clear();
+-    file_name << dir2 << enc << ".cset";
++    file_name << dir3 << enc << ".cset";
+     return !file_exists(file_name);
+   }
+ 
diff --git a/debian/patches/series b/debian/patches/series
index f2678df..a36d714 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,3 +7,4 @@
 #10_autotools.diff
 08_filters-info-installdir.diff
 09_debian-dictdir.diff
+1000_extra-data-searchpath.diff
