sshaw/normalize_country

Handling obsolete, historic codes like ISO 3166-1:AN

cschug opened this issue · 3 comments

The country code AN (Netherlands Antilles) has been removed in 2010 per ISO 3166-1 Newsletter VI-8.

I'm not sure what the best way would to handle such cases.

The easiest option would be to remove that entry from the list (as it isn't part of the standard anymore) and be done with it.

On the other hand it might be feasible to introduce an obsoleted_by property referencing the document mentioned above and add an optional parameter to relevant methods whether to include or exclude obsolete records. Or maybe even show obsolete records only? The default behavior should most likely reflect the current standard and exclude obsolete records and show only the active ones.

sshaw commented

Good questions.

I would ask is the library's purpose to maintain standards or to simply normalize? Certainly normalizing does require us to "maintain standards", e.g., when a name or code is added, but if something was obsoleted, what is the downside to keeping it in?

To ask a different way: do we normalize and validate or just normalize?

I would think if validation was necessary you'd use one of these to check on it before passing it to NormalizeCountry().

Thoughts?

That's a valid point of view.

Nevertheless most current systems won't expand the sequence of "\U0001F1E6" (REGIONAL INDICATOR SYMBOL LETTER A) and "\U0001F1F3" (REGIONAL INDICATOR SYMBOL LETTER N) into a flag anymore, which renders the emoji pretty useless and might lead to unexpected results (it's basically an invalid Unicode region code).

sshaw commented

Nevertheless most current systems won't expand the sequence of "\U0001F1E6"...

Thanks for the info. Can you provide an example of where this is not working?