Browse Source

* add encoding support to the SpellCheck()

git-svn-id: trunk@8377 -
Almindor 18 years ago
parent
commit
b5992b6744
1 changed files with 5 additions and 2 deletions
  1. 5 2
      packages/extra/aspell/scheck.pp

+ 5 - 2
packages/extra/aspell/scheck.pp

@@ -1,4 +1,4 @@
-unit scheck;
+unit sCheck;
 
 {$mode objfpc}{$H+}
 
@@ -12,6 +12,9 @@ type
   
   function SpellCheck(const Word, Lang: string; out Suggestions: TSuggestionArray): Integer;
 
+var
+  Encoding: string = 'utf-8';
+
 implementation
 
 function SpellCheck(const Word, Lang: string; out Suggestions: TSuggestionArray): Integer;
@@ -30,7 +33,7 @@ begin
   cnf := new_aspell_config();
 
   aspell_config_replace(cnf, 'lang', pChar(Lang));
-  aspell_config_replace(cnf, 'encoding', 'utf-8');
+  aspell_config_replace(cnf, 'encoding', pChar(Encoding));
 
   ape := new_aspell_speller(cnf);