cqrlog icon indicating copy to clipboard operation
cqrlog copied to clipboard

ADIF import does not honor <EOR> without newlines

Open MarSik opened this issue 2 years ago • 0 comments

I just tried to import ADI file with multiple records all on one line (no newline after EOR) and CQRLOG imported just the first entry and ignored the rest.

Adding the newline after each EOR into the ADI file fixed the issue.

From the ADIF specification (http://www.adif.org/310/ADIF_310.htm#ADI_Record):

Within a Record, QSO-Data-Specifiers may appear in any order. Characters between QSO-Data-Specifiers are ignored, as are 
characters between QSO-Data-Specifiers and End-of-Record tags; this permits the insertion of line break characters to improve
readability by users, or the insertion of any other information an ADI-exporting application cares to provide; ADI-importing applications
are free to ignore such characters.

The issue is here, CQRLOG reads a full line per entry: https://github.com/ok2cqr/cqrlog/blob/master/src/fAdifImport.pas#L812 This consumes the data for all entries when parsing the first one. Next iteration of the loop calls readln again and gets nothing.

MarSik avatar May 22 '22 17:05 MarSik