title: Proper capitalization of surnames in PHP
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2466706/capitalization-of-person-names-in-programming">Capitalization of Person names in programming</a>  </p>
  </blockquote>
  
  
  
  <p>I've noticed that people who are registering on my site are exceptionally lazy in the way that they don't even bother capitalizing their own names.</p>
  
  <p>My site is a business oriented one, so there's no "freedom of self-expression" argument here.</p>
  
  <p>First name capitalization is pretty easy as I can't think of a single instance where a Western first name would not start with a capital letter. I could be wrong.</p>
  
  <p>But capitalizing the last name gets more difficult, with names like</p>
  
  <pre><code>O'Brien
  O´Flaherty
  de Wit
  McKenzie
  Auditore da Firenze
  de los Remedios de Escalada
  Virta-Jokela
  </code></pre>
  
  <p>What would be a good solution to proper automatic capitalization of surnames in PHP that would get it right some 95% of the time? I am aware of <a href="http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/" rel="nofollow noreferrer">this</a>.</p>