You are not logged in.
Pages: 1
Hi, the recent 1.18.6309:
program Test;
{$APPTYPE CONSOLE}
uses
SynCommons;
var
R1, R2: TRawUTF8DynArray;
begin
CSVToRawUTF8DynArray('AA,BB,CC,DD', ',', ',', R1);
CSVToRawUTF8DynArray('A,B,C,D', ',', ',', R2);
Writeln(RawUTF8ArrayToCSV(R1));
Writeln(RawUTF8ArrayToCSV(R2));
Readln;
end.
AA,BB,CC,DD
A,B,C,D
AA,BB,CC,DD
A,B,C
RawUTF8ArrayToCSV problem place:
Actual:
while offs<length(CSV) do begin
Expected:
while offs<=length(CSV) do begin
SynECC.pas:
TECDHEProtocol.FromKey
CSVToRawUTF8DynArray(c,',','',chain);
mORMot.pas:
TSQLRecordPropertiesMapping.InternalCSVToExternalCSV
CSVToRawUTF8DynArray(CSVFieldNames,Sep,SepEnd,IntFields);
The SynSelfTests.pas TTestLowLevelCommon._UTF8 doesn't cover the listed case:
CSVToRawUTF8DynArray(res,',','',arr);
Check(arr[0]='one');
Check(arr[1]='two');
Check(arr[2]='three');
Finalize(arr);
CSVToRawUTF8DynArray('one=?,two=?,three=?','=?,','=?',arr);
Check(arr[0]='one');
Check(arr[1]='two');
Check(arr[2]='three');
Finalize(arr);
Last edited by Eugene Ilyin (2021-08-19 11:29:18)
Offline
Fix confirmed, thanks!
Offline
Pages: 1