Einzelnen Beitrag anzeigen

Hansa

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

Re: Text/ASCII-Datei in ASCII-Code umwandeln

  Alt 17. Apr 2005, 22:36
Auswahl der wichtigsten Zeiichen :

Delphi-Quellcode:
function AnsiToIBMAscii(s: string): string;
var
  i: integer;
begin
  Result := '';
  for i := 0 to Length(s) do
  begin
    case s[i] 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