google / libaddressinput

Google’s postal address library, powering Android and Chromium
Apache License 2.0
576 stars 104 forks source link

Erroneous sorting codes in French territories #217

Open jrlevine opened 3 years ago

jrlevine commented 3 years ago

The formats for PM YT MC WF NC MF GP GF MQ BL RE all erroneously include a %X sorting code.

They are all part of France, or for Monaco, a statelet whose post office is run by France. Both the French La Poste web site and the UPU confirm that they use standard French addresses with the five digit postal code before the city, no sorting code. For example, for PM https://www.upu.int/UPU/media/upu/PostalEntitiesFiles/addressingUnit/spmEn.pdf

It may have been confusing that for each territory the first three digits of its French code are fixed and only the last two vary within the territory, which might have been misinterpreted as a sorting code.

The fix is simple, remove all of the %X codes in each territory's format string.