Loading ...
Sorry, an error occurred while loading the content.
 

RE: [tmail2000] Mail2000 for Japanese

Expand Messages
  • Marcello
    Hi Mr Okada, I just updated your code in the site. Thanks a lot for your great contributions! Regards, ... name=Mail2000Msg0227.zip ===== Marcello Panda
    Message 1 of 6 , Mar 5, 2001
      Hi Mr Okada,

      I just updated your code in the site.
      Thanks a lot for your great contributions!

      Regards,

      --- Kunikazu Okada <kunikazu@...> escreveu: >
      > Oh, I forgot the attachment.(22Kb)
      >
      > > There are some bugs in my Mail2000 for Japanese,
      > > attached are the modified files.
      > >
      > > Mail2000Msg = TMailMessage2000, TMailPart
      > > Mail2000MsgIso8859 = functions for iso-8859-1/us_ascii
      > > Mail2000MsgJpn = functions for Japanese
      > >
      >

      > ATTACHMENT part 2 application/x-zip-compressed
      name=Mail2000Msg0227.zip



      =====
      Marcello "Panda" Tavares
      mycelo@...
      piadasdopanda-subscribe@yahoogroups.com
      http://mpanda.8m.com
      ICQ 5831833
      Sorocaba/SP BRAZIL

      __________________________________________________
      Do You Yahoo!?
      Get email at your own domain with Yahoo! Mail.
      http://personal.mail.yahoo.com/
    • Alexey A.Chernobaev
      Hello! I want to report some bugs. 1) component may crash after several LoadFromFile without Reset (it depends on message loaded); 2) there s a bug in
      Message 2 of 6 , Mar 7, 2001
        Hello!

        I want to report some bugs.

        1) component may crash after several LoadFromFile without Reset (it depends
        on message loaded);

        2) there's a bug in DecodeQuotedPrintable function in case of multi-line
        input:
        example is '=EC='#13#10'=EE=EC' which is translated to '?=EE?'.

        I can suggest the following alternative (assuming long-strings mode) which
        is also somewhat faster:

        function DecodeQuotedPrintable(const S: String): String;
        const
        HexDigits = ['0'..'9', 'A'..'F'];
        HexCorr = Ord('A') - Ord('0') - 10;
        var
        I, L: Integer;
        P, OutP, Limit, NextP, NextNextP: PChar;
        begin
        L:=Length(S);
        SetLength(Result, L);
        OutP:=PChar(Result);
        P:=PChar(S);
        Limit:=P + L;
        while P < Limit do begin
        if P^ <> '=' then begin
        OutP^:=P^;
        Inc(OutP);
        end
        else begin
        NextP:=P + 1;
        if NextP < Limit then begin
        NextNextP:=NextP + 1;
        if NextNextP < Limit then
        if (NextP^ in HexDigits) and (NextNextP^ in HexDigits) then begin
        I:=Ord(NextP^) - Ord('0');
        if I > 10 then Dec(I, HexCorr);
        L:=Ord(NextNextP^) - Ord('0');
        if L > 10 then Dec(L, HexCorr);
        OutP^:=Chr(I shl 4 + L);
        Inc(OutP);
        P:=NextNextP;
        end
        else
        if (PWideChar(NextP)^ = #$0A0D) or (PWideChar(NextP)^ = #$0D0A)
        then
        P:=NextNextP
        else
        if (NextP^ = #13) and (NextNextP^ <> #10) or
        (NextP^ = #10) and (NextNextP^ <> #13)
        then
        P:=NextP
        else begin // malformed input => copy as is
        OutP^:=P^;
        Inc(OutP);
        OutP^:=NextP^;
        Inc(OutP);
        OutP^:=NextNextP^;
        Inc(OutP);
        P:=NextNextP;
        end
        else begin
        if NextP^ <> '=' then begin // incomplete or malformed input =>
        copy as is
        OutP^:=P^;
        Inc(OutP);
        end;
        OutP^:=NextP^;
        Inc(OutP);
        Break;
        end;
        end;
        end;
        Inc(P);
        end; {while}
        SetLength(Result, OutP - PChar(Result));
        end;

        3) EncodeQuotedPrintable can generate a line which is longer than allowed
        in RFC 2045 if HeaderLine = True and input string contains #13.

        WBR, A.Chernobaev
      • Marcello
        Hi Mr Chernobaev, ... It is recommended to issue an Reset between every LoadFromFile or Fill, the structure is very complex. ... In this case if you send me
        Message 3 of 6 , Mar 8, 2001
          Hi Mr Chernobaev,

          --- "Alexey A.Chernobaev" <alexch@...> wrote:
          > 1) component may crash after several LoadFromFile without Reset (it
          > depends
          > on message loaded);

          It is recommended to issue an Reset between every LoadFromFile or Fill,
          the structure is very complex.

          > 2) there's a bug in DecodeQuotedPrintable function in case of
          > multi-line
          > input:
          > example is '=EC='#13#10'=EE=EC' which is translated to '?=EE?'.
          >
          > I can suggest the following alternative (assuming long-strings mode)
          > which
          > is also somewhat faster:
          >
          > function DecodeQuotedPrintable(const S: String): String;
          >
          > 3) EncodeQuotedPrintable can generate a line which is longer than
          > allowed
          > in RFC 2045 if HeaderLine = True and input string contains #13.

          In this case if you send me both functions fixed I will update the
          component immediately.

          Thanks a lot for your contribution.



          =====
          Marcello "Panda" Tavares
          mycelo@...
          piadasdopanda-subscribe@yahoogroups.com
          http://mpanda.8m.com
          ICQ 5831833
          Sorocaba/SP BRAZIL

          __________________________________________________
          Do You Yahoo!?
          Get email at your own domain with Yahoo! Mail.
          http://personal.mail.yahoo.com/
        Your message has been successfully submitted and would be delivered to recipients shortly.