mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-11 20:29:14 +02:00
* add encoding support to the SpellCheck()
git-svn-id: trunk@8377 -
This commit is contained in:
parent
1606ec996f
commit
b5992b6744
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user