title: Case-insensitive storage and unicode compatibility
body: <p>After I heard of someone at my work using <code>String.toLowerCase()</code> to store case-insensitive codes in a database for searchability, I had an <a href="http://msmvps.com/blogs/jon_skeet/archive/2009/11/02/omg-ponies-aka-humanity-epic-fail.aspx" rel="noreferrer">epic fail</a> moment thinking about the number of ways that it can go wrong:</p>
  
  <ul>
  <li>Turkey test (in particular changing locales on the running computer)</li>
  <li><a href="https://github.com/apache/lucene-solr/blob/trunk/lucene/JRE_VERSION_MIGRATION.txt" rel="noreferrer">Unicode version upgrades</a> - I mean, who knows about this stuff? If I upgrade to Java 7, I have to reindex my data if I'm being case-insensitive?</li>
  </ul>
  
  <p>What technologies are affected by Unicode versions?  </p>
  
  <p>Do I need to worry about Oracle or SQL Server (or other vendors) changing their unicode versions and resulting in one of my locales not resulting in the same lower or upper character conversion?</p>
  
  <p>How do I manage this? I'm tempted by the "simplicity" of ensuring I use the database conversion, but when there's an upgrade it'll be the same sort of issue.</p>