fix(lotw): MY_CNTY must not sink a non-US station's upload
TQSL validates MY_CNTY against the ADIF secondary-subdivision list, which is the US county enumeration — 'XX,County' with a two-letter state. A Canadian profile produced 'ONTARIO,Kawartha' (the export joined MY_STATE onto the county wholesale) and TQSL refused the whole record. Two layers: adifCounty only prefixes a two-letter state, so exports stop manufacturing the invalid shape; and UploadLoTW scrubs any MY_CNTY that is not the US shape before signing — MY_STATE and MY_GRIDSQUARE already locate the station for LoTW, and the US form survives for the county hunters. Table-tested.
This commit is contained in:
@@ -443,5 +443,11 @@ func adifCounty(state, county string) string {
|
||||
if c == "" || s == "" || strings.Contains(c, ",") {
|
||||
return c
|
||||
}
|
||||
// The "STATE,County" join is the ADIF secondary-subdivision format, and that
|
||||
// enumeration is a US thing — a two-letter state code. Prefixing a Canadian
|
||||
// "ONTARIO" produced "ONTARIO,Kawartha", which is valid nowhere.
|
||||
if len(s) != 2 {
|
||||
return c
|
||||
}
|
||||
return strings.ToUpper(s) + "," + c
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user