Closed DrHyde closed 3 years ago
hmm, yes, though surely both ways are in common usage
hmm, I just checked 10 UK websites, see it half one way, half the other. That said, the Royal Mail does seem to advise postcode on its own line.
Anyway, this issue is more correctly filed in address-formatting which is where the templates live. The idea being that the templates are independent of any individual programming language.
Geo::Address::Formatter "just" processes the templates in Perl.
Though both formats seem to be widely used (or perhaps it is a geographic thing - in 10 years of living in London I can't recall ever seeing postcode below city) it does seem the official Royal Mail format advises postcode on its own line.
Just to weigh in on this, whilst conflating a UK postcode with the post town (probably) won't preclude mail to that address being delivered, both Royal Mail's own guidelines and Ordnance Survey's documentation make clear the postcode should be on a separate line, at the end of the address if mailed inside the UK or immediately preceding UK as the country name if mailed internationally.
Disclosure: I'm currently working a lot with UK address data in all of its gloriously inconsistent forms.
References: https://personal.help.royalmail.com/app/answers/detail/a_id/81/~/how-to-address-your-mail-%28clear-addressing%29 and section 8.2 of https://www.ordnancesurvey.co.uk/documents/addressbase-products-getting-started-guide.pdf
fair enough, this issue is addressed (hahaha!) in https://github.com/OpenCageData/address-formatting/commit/075bd0e3037ae9d7af4d7af6aa6c7d02900a52dc
worldwide.yaml
say that a UK postcode goes immediately after the post town and on the same line. It should be on its own on the following line. ie ...Incorrect:
Correct: