[Lazarus] Problems with accented characters

Marco Alvarado cronodragon at gmail.com
Mon Mar 8 01:08:28 CET 2010


> You have some example to replace the text in real time using this package?

Sorry, I don't have an example like that, but the example listed on
the page seems simple enough:

 s := TUTF8Scanner.Create(Memo1.text);
 s.FindChars := 'öäü';
 repeat
   case s.FindIndex(s.Next) of
 {ö} 0: s.Replace('oe');
 {ä} 1: s.Replace('ae');
 {ü} 2: s.Replace('ue');
   end;
 until s.Done;
 Memo1.Text := s.UTF8String;
 s.free;

Hope it helps!
-Marco




More information about the Lazarus mailing list