* add encoding support to the SpellCheck()

git-svn-id: trunk@8377 -
This commit is contained in:
Almindor 2007-09-04 13:00:18 +00:00
parent 1606ec996f
commit b5992b6744

View File

@ -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);