Proper Case function for names?

  • [font="Verdana"]It's a hard, hard issue. What makes it complicated are names forms like:

    Xxx Vvv Yyy

    Xxx vvv Yyy

    Xxx VvYyy

    Xxx vvYyy

    Xxx V'Yyy

    Xxx v'Yyy

    I can remember finding valid names matching all of those forms. Oh, not to mention that many european names can contain all sorts of interesting characters.

    [/font]

  • Yeah, it's a complete minefield - I might build an exceptions table - so if the name contains '% van %' then skip propercase, various other special characters etc

    One blog on the subject basically (wisely) states that some people are pretty sensitive to how their name is written - perhaps in some circumstances just stick with what they put! - That's all great until someone registeres as Mr. A. A. !

  • I have said it a lot - proper-casing names is a losing proposition and I would not recommend it.

    The funny thing is, I just saw a name that will mess up nearly all of your rules for proper-casing or parsing a name.

    The new German minister of economic affairs, named..get this "Karl Theodor Maria Nikolaus Johann Jacob Philipp Franz Joseph Sylvester Freiherr von und zu Guttenberg"

    Good luck.

  • lol, our firstname field's probably a varchar(50) or something, that would blow him out :p

  • peitech (2/13/2009)


    lol, our firstname field's probably a varchar(50) or something, that would blow him out :p

    As far as I can tell, his first name is Karl - so I think you are good there.

    It's his middle and last names that I can't really follow.

  • The real issue is that names can follow multiple rules.

    McDonald and Mcdonald are both correct - for different people.

Viewing 6 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply