[Lazarus] Case error with cirilyc

Rigel Rigel rigel at gbg.bg
Thu Sep 17 22:41:38 CEST 2009


 I try it but don't work with cyrillic:
memo1 - абвгд; output memo2 - абвгд

procedure TForm1.Button1Click(Sender: TObject);
var s :TUTF8Scanner;
begin
s := TUTF8Scanner.Create(Memo1.Text);
s.FindChars :='абвгд';
// Memo1.text:=s.GenerateCaseStatement(); //Writes the case block for you
repeat
case s.FindIndex(s.Next) of
{а} 0: s.Replace('k');
{б} 1: s.Replace('в');
{в} 2: s.Replace('ввв');
{г} 3: s.Replace('g');
{д} 4: s.Replace('d');
end;
until s.Done;
Memo2.Text := s.UTF8String;
s.free;
end;                    



 >-------- Оригинално писмо --------
 >От:  theo 
 >Относно: Re: [Lazarus] Case error with cirilyc
 >До: lazarus at lists.lazarus.freepascal.org
 >Изпратено на: Четвъртък, 2009, Септември 17 22:38:41 EEST

 >You might try utf8scanner http://wiki.lazarus.freepascal.org/Theodp
...




More information about the Lazarus mailing list