Einzelnen Beitrag anzeigen

Hansa

Registriert seit: 9. Jun 2002
Ort: Saarland
7.554 Beiträge
 
Delphi 8 Professional
 
#6

Re: OEM to ANSI mit Delphi 8

  Alt 24. Feb 2004, 19:00
Der Code kommt mir bekannt vor, aber die Werte im CASE nicht. Probiere mal das:

Delphi-Quellcode:
function AnsiToAscii(s: string): string;
var
  i: integer;
begin
  Result := '';
  for i := 0 to Length(s) do
  begin
    case s[ii] of
      #196: Result := Result + #142; //Ä
      #214: Result := Result + #153; //Ö
      #220: Result := Result + #154; //Ü
      #228: Result := Result + #132; //ä
      #246: Result := Result + #148; //ö
      #252: Result := Result + #129; //ü
      #223: Result := Result + #225; //ß
    else
      Result := Result + s[i];
    end;
  end;
end;
Gruß
Hansa
  Mit Zitat antworten Zitat