unit Unit2;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;
type
TForm2 = class(TForm)
Button1: TButton;
Memo1: TMemo;
Memo2: TMemo;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
procedure TForm2.Button1Click(Sender: TObject);
var
Str: string;
begin
Str:= Memo1.Text;
Str:= StringReplace(Str, 'а', 'ÿ', [rfReplaceAll]);
Str:= StringReplace(Str, 'б', 'Ä', [rfReplaceAll]);
Str:= StringReplace(Str, 'в', 'Ë', [rfReplaceAll]);
Str:= StringReplace(Str, 'г', 'Ï', [rfReplaceAll]);
Str:= StringReplace(Str, 'д', 'Ö', [rfReplaceAll]);
Str:= StringReplace(Str, 'е', 'Ü', [rfReplaceAll]);
Str:= StringReplace(Str, 'ё', 'û', [rfReplaceAll]);
Str:= StringReplace(Str, 'ж', 'Ÿ', [rfReplaceAll]);
Str:= StringReplace(Str, 'з', 'ã', [rfReplaceAll]);
Str:= StringReplace(Str, 'и', 'õ', [rfReplaceAll]);
Str:= StringReplace(Str, 'й', 'Ã', [rfReplaceAll]);
Str:= StringReplace(Str, 'к', 'Õ', [rfReplaceAll]);
Str:= StringReplace(Str, 'л', 'ñ', [rfReplaceAll]);
Str:= StringReplace(Str, 'м', 'Ñ', [rfReplaceAll]);
Str:= StringReplace(Str, 'н', 'å', [rfReplaceAll]);
Str:= StringReplace(Str, 'о', 'Å', [rfReplaceAll]);
Str:= StringReplace(Str, 'п', 'ç', [rfReplaceAll]);
Str:= StringReplace(Str, 'р', 'Ç', [rfReplaceAll]);
Str:= StringReplace(Str, 'с', 'ø', [rfReplaceAll]);
Str:= StringReplace(Str, 'т', 'Ø', [rfReplaceAll]);
Str:= StringReplace(Str, 'у', 'Þ', [rfReplaceAll]);
Str:= StringReplace(Str, 'ф', 'þ', [rfReplaceAll]);
Str:= StringReplace(Str, 'х', 'š', [rfReplaceAll]);
Str:= StringReplace(Str, 'ц', 'Š', [rfReplaceAll]);
Str:= StringReplace(Str, 'ч', 'ß', [rfReplaceAll]);
Str:= StringReplace(Str, 'ш', 'Ð', [rfReplaceAll]);
Str:= StringReplace(Str, 'щ', 'ƒ', [rfReplaceAll]);
Str:= StringReplace(Str, 'ъ', 'μ', [rfReplaceAll]);
Str:= StringReplace(Str, 'ы', 'ð', [rfReplaceAll]);
Str:= StringReplace(Str, 'ь', 'æ', [rfReplaceAll]);
Str:= StringReplace(Str, 'э', 'œ', [rfReplaceAll]);
Str:= StringReplace(Str, 'ю', 'Æ', [rfReplaceAll]);
Str:= StringReplace(Str, 'я', 'Œ', [rfReplaceAll]);
//
Str:= StringReplace(Str, 'А', 'Â', [rfReplaceAll]);
Str:= StringReplace(Str, 'Б', 'Ê', [rfReplaceAll]);
Str:= StringReplace(Str, 'В', 'Î', [rfReplaceAll]);
Str:= StringReplace(Str, 'Г', 'Ô', [rfReplaceAll]);
Str:= StringReplace(Str, 'Д', 'Û', [rfReplaceAll]);
Str:= StringReplace(Str, 'Е', 'à', [rfReplaceAll]);
Str:= StringReplace(Str, 'Ё', '~', [rfReplaceAll]);
Str:= StringReplace(Str, 'Ж', 'è', [rfReplaceAll]);
Str:= StringReplace(Str, 'З', 'ì', [rfReplaceAll]);
Str:= StringReplace(Str, 'И', 'ò', [rfReplaceAll]);
Str:= StringReplace(Str, 'Й', 'ù', [rfReplaceAll]);
Str:= StringReplace(Str, 'К', 'À', [rfReplaceAll]);
Str:= StringReplace(Str, 'Л', 'È', [rfReplaceAll]);
Str:= StringReplace(Str, 'М', 'Ì', [rfReplaceAll]);
Str:= StringReplace(Str, 'Н', 'Ò', [rfReplaceAll]);
Str:= StringReplace(Str, 'О', 'Ù', [rfReplaceAll]);
Str:= StringReplace(Str, 'П', 'á', [rfReplaceAll]);
Str:= StringReplace(Str, 'Р', 'é', [rfReplaceAll]);
Str:= StringReplace(Str, 'С', 'í', [rfReplaceAll]);
Str:= StringReplace(Str, 'Т', 'ó', [rfReplaceAll]);
Str:= StringReplace(Str, 'У', 'ú', [rfReplaceAll]);
Str:= StringReplace(Str, 'Ф', 'ý', [rfReplaceAll]);
Str:= StringReplace(Str, 'Х', 'Á', [rfReplaceAll]);
Str:= StringReplace(Str, 'Ц', 'É', [rfReplaceAll]);
Str:= StringReplace(Str, 'Ч', 'Í', [rfReplaceAll]);
Str:= StringReplace(Str, 'Ш', 'Ó', [rfReplaceAll]);
Str:= StringReplace(Str, 'Щ', 'Ú', [rfReplaceAll]);
Str:= StringReplace(Str, 'Ъ', 'Ý', [rfReplaceAll]);
Str:= StringReplace(Str, 'Ы', 'ä', [rfReplaceAll]);
Str:= StringReplace(Str, 'Ь', 'ë', [rfReplaceAll]);
Str:= StringReplace(Str, 'Э', 'ï', [rfReplaceAll]);
Str:= StringReplace(Str, 'Ю', 'ö', [rfReplaceAll]);
Str:= StringReplace(Str, 'Я', 'ü', [rfReplaceAll]);
//
Memo2.Text:= Str;
end;
procedure TForm2.Button2Click(Sender: TObject);
var
Str: string;
begin
Str:= Memo2.Text;
Str:= StringReplace(Str, 'ÿ', 'а', [rfReplaceAll]);
Str:= StringReplace(Str, 'Ä', 'б', [rfReplaceAll]);
Str:= StringReplace(Str, 'Ë', 'в', [rfReplaceAll]);
Str:= StringReplace(Str, 'Ï', 'г', [rfReplaceAll]);
Str:= StringReplace(Str, 'Ö', 'д', [rfReplaceAll]);
Str:= StringReplace(Str, 'Ü', 'е', [rfReplaceAll]);
Str:= StringReplace(Str, 'û', 'ё', [rfReplaceAll]);
Str:= StringReplace(Str, 'Ÿ', 'ж', [rfReplaceAll]);
Str:= StringReplace(Str, 'ã', 'з', [rfReplaceAll]);
Str:= StringReplace(Str, 'õ', 'и', [rfReplaceAll]);
Str:= StringReplace(Str, 'Ã', 'й', [rfReplaceAll]);
Str:= StringReplace(Str, 'Õ', 'к', [rfReplaceAll]);
Str:= StringReplace(Str, 'ñ', 'л', [rfReplaceAll]);
Str:= StringReplace(Str, 'Ñ', 'м', [rfReplaceAll]);
Str:= StringReplace(Str, 'å', 'н', [rfReplaceAll]);
Str:= StringReplace(Str, 'Å', 'о', [rfReplaceAll]);
Str:= StringReplace(Str, 'ç', 'п', [rfReplaceAll]);
Str:= StringReplace(Str, 'Ç', 'р', [rfReplaceAll]);
Str:= StringReplace(Str, 'ø', 'с', [rfReplaceAll]);
Str:= StringReplace(Str, 'Ø', 'т', [rfReplaceAll]);
Str:= StringReplace(Str, 'Þ', 'у', [rfReplaceAll]);
Str:= StringReplace(Str, 'þ', 'ф', [rfReplaceAll]);
Str:= StringReplace(Str, 'š', 'х', [rfReplaceAll]);
Str:= StringReplace(Str, 'Š', 'ц', [rfReplaceAll]);
Str:= StringReplace(Str, 'ß', 'ч', [rfReplaceAll]);
Str:= StringReplace(Str, 'Ð', 'ш', [rfReplaceAll]);
Str:= StringReplace(Str, 'ƒ', 'щ', [rfReplaceAll]);
Str:= StringReplace(Str, 'μ', 'ъ', [rfReplaceAll]);
Str:= StringReplace(Str, 'ð', 'ы', [rfReplaceAll]);
Str:= StringReplace(Str, 'æ', 'ь', [rfReplaceAll]);
Str:= StringReplace(Str, 'œ', 'э', [rfReplaceAll]);
Str:= StringReplace(Str, 'Æ', 'ю', [rfReplaceAll]);
Str:= StringReplace(Str, 'Œ', 'я', [rfReplaceAll]);
//
Str:= StringReplace(Str, 'Â', 'А', [rfReplaceAll]);
Str:= StringReplace(Str, 'Ê', 'Б', [rfReplaceAll]);
Str:= StringReplace(Str, 'Î', 'В', [rfReplaceAll]);
Str:= StringReplace(Str, 'Ô', 'Г', [rfReplaceAll]);
Str:= StringReplace(Str, 'Û', 'Д', [rfReplaceAll]);
Str:= StringReplace(Str, 'à', 'Е', [rfReplaceAll]);
Str:= StringReplace(Str, '~', 'Ё', [rfReplaceAll]);
Str:= StringReplace(Str, 'è', 'Ж', [rfReplaceAll]);
Str:= StringReplace(Str, 'ì', 'З', [rfReplaceAll]);
Str:= StringReplace(Str, 'ò', 'И', [rfReplaceAll]);
Str:= StringReplace(Str, 'ù', 'Й', [rfReplaceAll]);
Str:= StringReplace(Str, 'À', 'К', [rfReplaceAll]);
Str:= StringReplace(Str, 'È', 'Л', [rfReplaceAll]);
Str:= StringReplace(Str, 'Ì', 'М', [rfReplaceAll]);
Str:= StringReplace(Str, 'Ò', 'Н', [rfReplaceAll]);
Str:= StringReplace(Str, 'Ù', 'О', [rfReplaceAll]);
Str:= StringReplace(Str, 'á', 'П', [rfReplaceAll]);
Str:= StringReplace(Str, 'é', 'Р', [rfReplaceAll]);
Str:= StringReplace(Str, 'í', 'С', [rfReplaceAll]);
Str:= StringReplace(Str, 'ó', 'Т', [rfReplaceAll]);
Str:= StringReplace(Str, 'ú', 'У', [rfReplaceAll]);
Str:= StringReplace(Str, 'ý', 'Ф', [rfReplaceAll]);
Str:= StringReplace(Str, 'Á', 'Х', [rfReplaceAll]);
Str:= StringReplace(Str, 'É', 'Ц', [rfReplaceAll]);
Str:= StringReplace(Str, 'Í', 'Ч', [rfReplaceAll]);
Str:= StringReplace(Str, 'Ó', 'Ш', [rfReplaceAll]);
Str:= StringReplace(Str, 'Ú', 'Щ', [rfReplaceAll]);
Str:= StringReplace(Str, 'Ý', 'Ъ', [rfReplaceAll]);
Str:= StringReplace(Str, 'ä', 'Ы', [rfReplaceAll]);
Str:= StringReplace(Str, 'ë', 'Ь', [rfReplaceAll]);
Str:= StringReplace(Str, 'ï', 'Э', [rfReplaceAll]);
Str:= StringReplace(Str, 'ö', 'Ю', [rfReplaceAll]);
Str:= StringReplace(Str, 'ü', 'Я', [rfReplaceAll]);
//
Memo1.Text:= Str;
end;
end.