HOME  MAIL |
. Windows-1251, KOI8-R, ISO-8859-5 DOS. , , , 160 - "", 150 "" . . ( ). . , , . . procedure TForm1.Button1Click(Sender: TObject); var code1, code2: TCode; s: string; c: char; i: integer; chars: array [char] of char; str: array [TCode] of string; begin case ComboBox1.ItemIndex of 1: code1 := koi; 2: code1 := iso; 3: code1 := dos; else code1 := win; end; case ComboBox2.ItemIndex of 1: code2 := koi; 2: code2 := iso; 3: code2 := dos; else code2 := win; end; s := Memo1.Text; Str[win] := ''; Str[koi] := ''; Str[iso] := ''; Str[dos] := '"'''; for c := #0 to #255 do Chars[c] := c; for i := 1 to Length(Str[win]) do Chars[Str[code2][i]] := Str[code1][i]; for i := 1 to Length(s) do s[i] := Chars[s[i]]; Memo2.Text := s; end; email: delphi4all@narod.ru |