Some of the base64 encoded emails I'm receiving don't seem to be decoded 
properly. I've added an extra function in to sort it out


procedure TMsgDecoder.RemoveWeirdCharacters;
const
WeirdBase = Char(226) + Char(128);
Weird1 = WeirdBase + Char(157);
Weird2 = WeirdBase + Char(156);
Weird3 = WeirdBase + Char(153);
Weird4 = WeirdBase + Char(148);
Weird5 = WeirdBase + Char(147);
begin
if 0 <> Pos(WeirdBase, iBody.Text) then begin
iBody.Text := StringReplace(iBody.Text, Weird1, '"', [rfReplaceAll]);
iBody.Text := StringReplace(iBody.Text, Weird2, '"', [rfReplaceAll]);
iBody.Text := StringReplace(iBody.Text, Weird3, '''', [rfReplaceAll]);
iBody.Text := StringReplace(iBody.Text, Weird4, '''', [rfReplaceAll]);
iBody.Text := StringReplace(iBody.Text, Weird5, '', [rfReplaceAll]);
end;
end;

I know I could do it more efficiently but this is just a quick fix to stop 
complaints.

Should Synapse sort this out or is the domain of the html display component?


Roy Lambert

------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public

Reply via email to