Re: idMessage bug ??

Giganews Newsgroups
Subject: Re: idMessage bug ??
Posted by:  Kim G. Pedersen (k…@macaos.com)
Date: Tue, 20 Sep 2005

my suggestion for solving the problem are

idGlobal.pas --->
function TextIsSame(const A1: string; const A2: string): Boolean;
begin
{$IFDEF DotNet}
Result := A1.Compare(A1, A2, True) = 0;  //maybe this has to be fixed to
, but I dont now DotNet.
{$else}
//Result := AnsiCompareText(A1, A2) = 0;
  Result  :=AnsiCompareText(ansiUppercase(A1), ansiUppercase(A2)) = 0; //use
instead of above.
{$endif}
end;

Best Regards
Kim Pedersen

> Hi
>
> I have problem with
>
> TIdMessageDecoderInfoMIME.CheckForStart where
>
> ASender.MIMEBoundary.Boundary = RNEOCQKI6USYN=_BGRAAM3C9O63PB9TFN9
>
> and
>
> Aline= Content-Type: multipart/mixed;
> boundary="RneocQKI6usyN=_bgRaAM3c9O63pb9tFn9"
>
> according to AnsiCompare aA is not the same as AA since double A is a
> special
> character Å in
> in our language.
> a question ? ,, {Do not Localize}  , does that mean it should not be
> translated
> to
> local chars ??
> Best regards
> Kim
> function TIdMessageDecoderInfoMIME.CheckForStart(ASender: TIdMessage;
> const ALine: string): TIdMessageDecoder;
> begin
> if ASender.MIMEBoundary.Boundary <> '' then begin
> if TextIsSame(ALine, '--' + ASender.MIMEBoundary.Boundary) then
> begin
> {Do not Localize}
> Result := TIdMessageDecoderMIME.Create(ASender);
> end else if TextIsSame(ASender.ContentTransferEncoding, 'base64')
> or
> {Do not Localize}
> TextIsSame(ASender.ContentTransferEncoding, 'quoted-printable')
> then
> begin    {Do not Localize}
> Result := TIdMessageDecoderMIME.Create(ASender, ALine);
> end else begin
> Result := nil;
> end;
> end else begin
> Result := nil;
> end;
> end;
> function TextIsSame(const A1: string; const A2: string): Boolean;
> begin
> {$IFDEF DotNet}
> Result := A1.Compare(A1, A2, True) = 0;
> {$else}
> Result := AnsiCompareText(A1, A2) = 0;
> {$endif}
> end;

Replies

In response to

idMessage bug ?? posted by Kim G. Pedersen on Mon, 19 Sep 2005