function ErsetzeUmlauteUndEszet(const s: string; ZweiteAuchGross: boolean):
string;
var
x: integer;
z: char;
function a(c: char; i: integer): string;
begin
result := chr(ord(s[x]) - i) + c;
end;
begin
result := '';
z := chr(101 - ord(ZweiteAuchGross) * 32);
for x := 1 to length(s) do begin
case s[x] of
'Ö', 'Ü': result := result + a(z, 135);
'ö', 'ü': result := result + a('e', 135);
'Ä': result := result + a(z, 131);
'ä': result := result + a('e', 131);
'ß': result := result + 'ss';
else result := result + s[x];
end;
end;
end;
// Beispielaufruf
procedure TForm1.Button8Click(Sender: TObject);
var
s: string;
begin
s := 'ÄÖÜäöüß';
s := ErsetzeUmlauteUndEszet(s, true);
showmessage(s);
end;