xml2rfc icon indicating copy to clipboard operation
xml2rfc copied to clipboard

xml2rfc does not accept "The Netherlands" as a country name

Open ajeanmahoney opened this issue 2 years ago • 6 comments

Describe the issue

Specifying <country>The Netherlands</country> will cause xml2rfc to warn with the following message and not write the country name in the output:

"Warning: Country lookup failed for <country>The Netherlands</country>.  
Use --country-help to show recognized country names and codes
 Created file rfc9102.html"

I figure this isn't fixable given that the library used for addresses is not being updated. The workaround is to use "Netherlands" instead.

Code of Conduct

ajeanmahoney avatar Feb 22 '23 19:02 ajeanmahoney

Note that the wavering discussions on various lists agreed that we probably want to keep the country as the only semantic-markup "postal" element. So this needs to be fixed. If there is no library support, Likely, xml2rfc will just accrete a number of special case translations...

cabo avatar Feb 22 '23 22:02 cabo

The problem is that the addresses are currently fed into an abandonware library for formatting, and it has an internal table that maps country names into address formats. With the change we need to make, <country> becomes a free text field. I suppose the RPC could keep their own list of allowed country names but I don't see why they would, since you would expect people to know what country they live in.

jrlevine avatar Feb 22 '23 23:02 jrlevine

"Free text field" isn't quite as semantic, but OK. This just means that the work with normalizing this field is with the people who want to make use of it, not once at publication time. (I'd rather just have a two-character TLD, but that has other interesting issues.)

cabo avatar Feb 22 '23 23:02 cabo

@jrlevine The RPC does check country names against the English short names found in the ISO country codes. We have a small list of exceptions. For instance, we prefer "The Netherlands" over "Netherlands (the)".

ajeanmahoney avatar Feb 22 '23 23:02 ajeanmahoney

Interesting. Excerpt (since 8650):

 248 China
   2 FI
   4 FR
  92 Finland
 205 France
   6 NL
   2 NZ
  40 Netherlands
  17 New Zealand
   2 SE
  94 Sweden
  18 US
  37 USA
   2 United States
1019 United States of America
   8 中国

cabo avatar Feb 22 '23 23:02 cabo

I don’t suppose we’ve had any authors from The Bahamas, The Gambia, or The Sudan. Anyway I’d rather delegate the decision to sensible editors than the abandonware library.

jrlevine avatar Feb 22 '23 23:02 jrlevine