fix(adif): CNTY must be STATE,COUNTY
ADIF defines CNTY as "STATE,COUNTY" — "GA,BARROW". OpsLog wrote the bare county name, which a receiving logger cannot resolve: county names repeat across states, and there is a Washington County in thirty of them. The award engine here was never affected, since it reads the columns rather than the ADIF; the damage was to every file we hand to someone else. One writer covers everything — writeRecord — so this fixes file exports and the LoTW, Club Log, HRDLog and QRZ uploads together. MY_CNTY gets the same treatment. The county alone is still written when no state is known: a bare name is worth more than nothing, and inventing a prefix would be worse than either. A value that already carries a comma passes through untouched, so re-exporting an imported record cannot double the prefix. Import is the mirror: "GA,BARROW" fills both columns, and a file carrying the bare county — as OpsLog's own older exports do — still imports unchanged. The state parsed out of CNTY only fills a blank STATE, never overrides it: STATE is the dedicated field and the more specific statement.
This commit is contained in:
@@ -19,8 +19,8 @@ func TestCharCountLengthRepair(t *testing.T) {
|
||||
},
|
||||
{
|
||||
name: "cyrillic",
|
||||
wantQTH: "Дзержинск", // 9 chars / 18 bytes, declared 9
|
||||
wantName: "Александр Чайка", // 15 chars / 29 bytes, declared 15
|
||||
wantQTH: "Дзержинск", // 9 chars / 18 bytes, declared 9
|
||||
wantName: "Александр Чайка", // 15 chars / 29 bytes, declared 15
|
||||
adi: "<EOH>\n<CALL:6>UA3TFS<NAME:15>Александр Чайка<QTH:9>Дзержинск<EOR>\n",
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user