idMessage bug ??

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

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