Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Scottish names
OK, here's a good one ...
I am developing a system which has data inputs from many legacy
systems. One of the fields is 'Name'. This can be 'MR PAUL SMITH',
'Mr P Smith', 'PAUL J SMITH' - pretty much anything (yuck).
Now a requirement is to have the name in 'proper name' case. "Pah" I hear you cry collectively, "use INITCAP you moron". All very well and good, except when we come across our friends of Scottish ancestry.
I need to write a routine that allows for 'Mac's amd 'Mc's, which is not as straightforward as it first seems.
You don't want 'MACE' being translated to 'MacE', for example, nor
'Macken' to 'MackEn'.
The general rules are
o Always capitalise after 'Mc'
o Only capitalise after 'Mac' if the string is >= 6 characters
o Don't capitalise the k in 'Mack...'
o Allow for some specific exceptions (e.g. MacKendrick)
So has anyone ever done anything like this. I'll go ahead and do it myself, it just strikes me as something someone else may have done before.
Thanks,
CE Received on Wed Jun 26 2002 - 09:50:13 CDT
![]() |
![]() |