title: Does a reliable way to capitalize Unicode text exist?
body: <p>I recently had to deal with some complex problems working with Unicode string (using PHP, a language I know pretty well). The <code>mbstring</code> extension was not really working properly and we had huge pains trying to capitalize Unicode letters, which with ASCII text is a trivial problem, already solved in a variety of ways. </p>
  
  <p>If I had to solve this problem with ASCII text, I would probably just take the character, check if it is a letter and then subtract 32 from its ASCII value, for example! But as for now, I could not find anything explaining how the problem of capitalization of Unicode text has been solved: do I need to store a complete associative table to map every lowercase character to its related uppercase version? I suppose (and hope) I will hear a huge <code>NO</code>!</p>
  
  <p>The heart of the question: does any method to correctly convert lowercases into uppercases (and back) exist when operating with Unicode characters? And if this is the case, which strategies are applied? </p>
  
  <p>For this test suppose you do not have any, but really ANY module available: no <code>mbstring</code>, no <code>iconv</code>, nothing. Moreover, for the sake of simplicity suppose to have the problem of recognizing individual characters already solved, our <code>String</code> object has a <code>nextChar()</code> method which can be used to find the next character, independently from its byte-length. Suppose that what you want to do is taking a string, iterate over it with <code>nextChar()</code> and, for each character, capitalize it if possible.</p>
  
  <p>If unclear or in the need of more information simply comment, I will try to answer your doubts, if they are not even bigger than mine at the moment ;)</p>