Форум: "Сети";
Текущий архив: 2004.09.19;
Скачать: [xml.tar.bz2];
ВнизQuoted-printable реализация Найти похожие ветки
← →
Chop Suey (2004-07-11 11:31) [0]Может кто-нибудь знает, где взять данный алгоритм кодирования е-майл? Или хотя --> на доки по этому делу. Благодарен...
← →
Reindeer Moss Eater © (2004-07-11 16:20) [1]IdCoderQuotedPrintable.pas
← →
Chop Suey (2004-07-11 19:47) [2]Там - не разобраться - используются много классов-предков, чтоб реализовать эту кодировку... Так же много юнитов и все такое.. Мне бы найти ПРОСТОЙ и алгоритм и без всяких наворотов....
← →
Slym © (2004-07-12 06:39) [3]TIdDecoderQuotedPrintable = class(TIdDecoder)
public
procedure DecodeToStream(AIn: string; ADest: TStream); override;
end;
TIdEncoderQuotedPrintable = class(TIdEncoder)
public
function Encode(ASrcStream: TStream; const ABytes: integer = MaxInt): string; override;
end;
← →
Hazard © (2004-07-12 15:55) [4]Quoted_Pr_Code: array[0..153] of string =
("=CA","=C3","=D5","=CB","=C5","=CE","=C7","=DB","=DD","=DA","=C8","=DF","=C6","=D9","=D7","=C1","=D0","=D2","=CF","=CC" ,"=C4","=D6","=DC","=D1","=DE",
"=D3","=CD","=C9","=D4","=D8","=C2","=C0","=EA","=E3","=F5","=EB","=E5","=EE","=E7","=FB","=FD","=FA","=E8","=FF","=E6", "=F9","=F7","=E1","=F0","=F2",
"=EF","=EC","=E4","=F6","=FC","=F1","=FE","=F3","=ED","=E9","=F4","=F8","=E2","=E0",
".","q","w","e","r","t","y","u","i","o","p","[","]","a","s","d","f","g","h","j","k","l",";","z","x","c","v","b","n","m", "Q","W",
"E","R","T","Y","U","I","O","P","[","]","A","S","D","F","G","H","J","K","L",";","Z","X","C","V","B","N","M",",",".","/",
"1","2","3","4","5","6","7","8","9","0",
"!","@","#","$","%","^","&","*","(",")","_","+","|","~","-","=","\","=20");
Quoted_Pr_Sumbol: array[0..153] of string =
("й","ц","у","к","е","н","г","ш","щ","з","х","ъ","ф","ы","в","а","п","р","о","л","д","ж","э","я","ч","с","м","и","т","ь" ,"б","ю",
"Й","Ц","У","К","Е","Н","Г","Ш","Щ","З","Х","Ъ","Ф","Ы","В","А","П","Р","О","Л","Д","Ж","Э","Я","Ч","С","М","И","Т","Ь", "Б","Ю",
".","q","w","e","r","t","y","u","i","o","p","[","]","a","s","d","f","g","h","j","k","l",";","z","x","c","v","b","n","m", "Q","W",
"E","R","T","Y","U","I","O","P","[","]","A","S","D","F","G","H","J","K","L",";","Z","X","C","V","B","N","M",",",".","/",
"1","2","3","4","5","6","7","8","9","0",
"!","@","#","$","%","^","&","*","(",")","_","+","|","~","-","=","\"," ");
function Decode(Str: String): String;
var
a,i, j, Index: Integer;
s:String;
Label m1;
begin
Result := "";
s:=Str;
i:=-2;
Repeat
inc(i,3);
m1:
s:=Copy(Str,i,3);
if Length(s)>0 then
if s[1]="=" then Begin
Index := -1;
for j := Low(Quoted_Pr_Code) to High(Quoted_Pr_Code) do
if Quoted_Pr_Code[j] = s then
begin
Index := j;
Break;
end;
if Index = -1 then Result := Result + s else Result := Result + Quoted_Pr_Sumbol[Index];
end {if s[1]}
else Begin Result := Result + s[1];inc(I); goto m1;end;;
Until i >= Length(Str);
end;
На тебе, что по твоему попроще:)
P.S. Кусок с работающего исходника, функцию под себя подправишь. (она подогнана под прогу). Свирепствуй!!! :)
← →
Chop Suey (2004-07-12 19:14) [5]Сенкс ;) Было бы вообще хорошо если бы ты подогнал ф-цию Encode() :)
← →
Hazard © (2004-07-14 01:03) [6]Ну а самому сделать? Здесь буквально пару строчек исправить!
Страницы: 1 вся ветка
Форум: "Сети";
Текущий архив: 2004.09.19;
Скачать: [xml.tar.bz2];
Память: 0.46 MB
Время: 0.038 c