I have difficulty displaying correct accented letter values lazarus / 21-General ---------------------------------------------------------------------- aacs · 2021-02-13 05:15 I would be very grateful if you could help me! I need  to show the values of the accented letters as well thanks! function valor(Str:String):String; const Lin1:String = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzÆÁ ÅÃÄáâæàåãäÉÊÈÍÎÌÏÇÓÔÒØÖÞÚÛÙÜæáâåãäáâæàåãäéêèíîìïçóôòøöþúûùü'; Lin2:String = '1234567891234567891234567812345678912345678912345678111 11111111115559999366666633331111111111111555999936666663333'; var x,y:integer; begin    Result:='';    for y:=1 to Length(Str) do      begin        x:=0;        repeat x:=x+1;        until Str[y]=Lin1;        Result:=Result+Lin2;      end; end; procedure TForm1.Edit1Change(Sender: TObject); begin    Memo1.clear;    Memo1.text:=(valor(Edit1.Text)); end; ---------------------------------------------------------------------- speter · 2021-02-13 07:37 Please consider enclosing your code within [code]...[/code] tags (the # symbol in the forum's "post" page. ---------------------------------------------------------------------- paweld · 2021-02-13 07:48 Add unit LazUTF8 to uses section and: Length(Str) replace to UTF8Length(Str)Str[y] replace to UTF8Copy(Str, y, 1)eg. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i uses  LazUTF8; function valor(Str:String):String;const  Lin1: String = 'ABCD EFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzÆÁÂÅÃÄáâæàåãäÉÊÈÍÎÌÏÇÓ ÔÒØÖÞÚÛÙÜæáâåãäáâæàåãäéêèíîìïçóôòøöþúûùü';  Lin2: String = '1234567891 2345678912345678123456789123456789123456781111111111111555999936666663 3331111111111111555999936666663333';var  x, y:integer;begin   Result:='';   for y:=1 to UTF8Length(Str) do   begin     x := UTF8Pos(UTF8Copy(Str, y, 1), Lin1);     if x > 0 then       Result:=Result+UTF8Copy(Lin2, x, 1);   end;end; procedure TForm1.Edit1Change(Sender: TObject);begin   Memo1.clear;   Memo1.text:=(valor(Edit1.Text));end;