mORMot and Open Source friends
Check-in [7ed35b947a]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:source code modified to be 7 bit Ansi (so will work with all encodings)
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 7ed35b947a4ea46e673cc9f59060ec376d3ed5db
User & Date: G018869 2010-12-01 13:35:59
Context
2010-12-02
06:54
new method TRawUTF8List.AddRawUTF8List(List: TRawUTF8List) check-in: 0c19394779 user: G018869 tags: trunk
2010-12-01
13:35
source code modified to be 7 bit Ansi (so will work with all encodings) check-in: 7ed35b947a user: G018869 tags: trunk
13:27
source code modified to be 7 bit Ansi (so will work with all encodings) check-in: cf001067c7 user: G018869 tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to SynSelfTests.pas.

307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
...
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
...
672
673
674
675
676
677
678
679
680
procedure TTestCryptographicRoutines.Adler32;
begin
  Check(Adler32SelfTest);
end;

procedure TTestCryptographicRoutines.Base64;
const Value: WinAnsiString = 'Hello /c''�tait ��+';
var tmp: TSockData;
    i: Integer;
begin
  Check(Base64Encode(Value)=RawByteString('SGVsbG8gL2Mn6XRhaXQg5+Ar'));
  tmp := StringFromFile(paramstr(0));
  Check(Base64Decode(Base64Encode(tmp))=tmp);
  tmp := '';
................................................................................
      StandardFontsReplace := embed;
      AddPage;
      Canvas.SetFont('arial',10,[]);
      Check(Canvas.Page.Font.Name=Name[embed]);
      y := 800;
      for i := 1 to 30 do begin
        Canvas.SetFont('Arial',9+i,[]);
        Canvas.TextOut(100,y,WinAnsiString('Texte accentu n�'+IntToStr(i)));
        dec(y,9+i);
      end;
      SaveToStream(MS,Date);
      Check(Hash32(MS.Memory,MS.Position)=Hash[embed]);
      if not embed then begin
        NewDoc;
        MS.Clear;
................................................................................
      if (crc and 1)<>0 then
        // $edb88320 from polynomial p=(0,1,2,4,5,7,8,10,11,12,16,22,23,26)
        crc := (crc shr 1) xor $edb88320 else
        crc := crc shr 1;
    CRC32Tab[i] := crc;
  end;
end;}

end.






|







 







|







 







|

307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
...
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
...
672
673
674
675
676
677
678
679
680
procedure TTestCryptographicRoutines.Adler32;
begin
  Check(Adler32SelfTest);
end;

procedure TTestCryptographicRoutines.Base64;
const Value: WinAnsiString = 'Hello /c'''#233'tait '#231#224'+';
var tmp: TSockData;
    i: Integer;
begin
  Check(Base64Encode(Value)=RawByteString('SGVsbG8gL2Mn6XRhaXQg5+Ar'));
  tmp := StringFromFile(paramstr(0));
  Check(Base64Decode(Base64Encode(tmp))=tmp);
  tmp := '';
................................................................................
      StandardFontsReplace := embed;
      AddPage;
      Canvas.SetFont('arial',10,[]);
      Check(Canvas.Page.Font.Name=Name[embed]);
      y := 800;
      for i := 1 to 30 do begin
        Canvas.SetFont('Arial',9+i,[]);
        Canvas.TextOut(100,y,WinAnsiString('Texte accentu'#233' n�'+IntToStr(i)));
        dec(y,9+i);
      end;
      SaveToStream(MS,Date);
      Check(Hash32(MS.Memory,MS.Position)=Hash[embed]);
      if not embed then begin
        NewDoc;
        MS.Clear;
................................................................................
      if (crc and 1)<>0 then
        // $edb88320 from polynomial p=(0,1,2,4,5,7,8,10,11,12,16,22,23,26)
        crc := (crc shr 1) xor $edb88320 else
        crc := crc shr 1;
    CRC32Tab[i] := crc;
  end;
end;}
    
end.