Page 1 of 1

[SOLVED] Help form a list of last name formats

Posted: Tue Dec 27, 2005 1:44 pm
by dallasx
Ok, in my never ending quest to control data as much as I can, I need to take in certain consideration certain types of last names.

Here is what I have so far. Can yall help me with others?
  • Mc________
  • Mac________
  • O'________
  • D'________
  • L'________
  • ________-________ (maiden name tacked on the man's last name)

Posted: Tue Dec 27, 2005 1:57 pm
by jayshields
Can I ask why you would need to know this?

If you want to control name entry to an unrealistic extent just allow unlimited capital letters, one apostrophe and unlimited hyphens. No numbers, just letters, and a max entry of something suitable, 30 should cover it.

Being able to decipher what type of a Surname someone has shouldn't be necessary.

When I am validating surnames I just make sure there are no numbers (sometimes I don't even bother with that), and limit it to 30 characters.

Posted: Tue Dec 27, 2005 2:19 pm
by dallasx
My internal and external customers think that text is formatted magically somehow. This just saves me time trying to correct it later.

Posted: Tue Dec 27, 2005 2:37 pm
by foobar
dallasx wrote:My internal and external customers think that text is formatted magically somehow. This just saves me time trying to correct it later.
Why not have your script/program correct it for you?

Posted: Tue Dec 27, 2005 2:48 pm
by dallasx
foobar wrote:
dallasx wrote:My internal and external customers think that text is formatted magically somehow. This just saves me time trying to correct it later.
Why not have your script/program correct it for you?
That is what I am going to do. I just need a little help trying to figure out if there are any more of the sur names formats (i guess you would call it that) than the ones listed above.

Posted: Tue Dec 27, 2005 2:58 pm
by foobar
dallasx wrote: That is what I am going to do. I just need a little help trying to figure out if there are any more of the sur names formats (i guess you would call it that) than the ones listed above.
Why bother? Just capitalize the first letter of every word in their surname if there aren't any capitals already, and you're done. It's your users' problem to try to enter their surname with the correct capitalization, realy.

Also, relying on surname formats may fail with non-English surnames, causing you more problems. Take, for instance, the name Maciejkowski. A perfectly normal Polish surname, which would be converted into MacIejkowski as per your script.

Posted: Tue Dec 27, 2005 3:18 pm
by dallasx
foobar wrote:
dallasx wrote: That is what I am going to do. I just need a little help trying to figure out if there are any more of the sur names formats (i guess you would call it that) than the ones listed above.
Why bother? Just capitalize the first letter of every word in their surname if there aren't any capitals already, and you're done. It's your users' problem to try to enter their surname with the correct capitalization, realy.

Also, relying on surname formats may fail with non-English surnames, causing you more problems. Take, for instance, the name Maciejkowski. A perfectly normal Polish surname, which would be converted into MacIejkowski as per your script.
True, point taken.

Yeah, the heck with it :)

Posted: Tue Dec 27, 2005 3:55 pm
by foobar
dallasx wrote: True, point taken.

Yeah, the heck with it :)
That's the spirit! Let the problem solve itself. :) After all, if someone refuses to type their name properly, who cares? They're only hurting themselves...

Posted: Tue Dec 27, 2005 4:10 pm
by dallasx
foobar wrote:
dallasx wrote: True, point taken.

Yeah, the heck with it :)
That's the spirit! Let the problem solve itself. :) After all, if someone refuses to type their name properly, who cares? They're only hurting themselves...
Well, yes and no. I need contact names, addresses and phone numbers to be uniform. That's why I was going to try to format the name the way I want it but oh well. I'll keep my current system of exploding a string, stripping the case and upper casing the first and last name.