[thelist] Name and Address Capitalization

Tony Light TonyLight at blueyonder.co.uk
Mon Apr 19 03:07:02 CDT 2004


Hi, I've got a tricky little problem with a database of names and addresses that are in upper case, but when I use them I need to output in mixed case, suitably capitalized.  To make things more interesting, it is a large database with names and addresses from all over the world (though mainly in the UK).

It seems that surnames are the most awkward - but as it is common for streets to be named after people, you get exactly the same problems in addresses as well.

I've googled, but not managed to find anything that helps much.  Lots of talk about using 'Standard Capitalization Rules', but no explanation of what they are.  A common assumption is that you have the benefit of seeing the case in which the user entered the data. Not so - just got capitals.  So if anybody on the list can point me towards something useful, I'll be grateful.

Simple names like JOHN SMITH => John Smith, are easy enough.
Names starting with MC can probably always be treated as Scottish, so MCADAM => McAdam.
MAC is more of a problem. Loads of Scottish MACs can be treated like MC, but what about the exceptions - Macey, Macclesfield, etc.

Need to be able to cope with hyphens (think that means capitalize the next letter).
Apostrophes (again, capitalize the next letter).
What about single letters or short words before the apostrophes (d'Arcy, Dell'Aringa, etc) are there rules for these, or are they a matter of personal choice?

Also need to cope with things like John Smith Jnr. (easy) and Davis Love III (not quite so easy, as the III is in there with the surname, and you don't want to change it to Iii).  Similar sorts of things crop up in addresses (USA to pick one obvious example).

Regards,
    Tony Light.


More information about the thelist mailing list