title: Valid Locale Names
body: <p>How do you find valid locale names?</p>
  
  <p>I am currently using MAC OS X.<br>
  But information about other platforms would also be useful.</p>
  
  <pre><code>#include &lt;fstream&gt;
  #include &lt;iostream&gt;
  
  
  int main(int argc,char* argv[])
  {
      try
      {
          std::wifstream  data;
          data.imbue(std::locale("en_US.UTF-16"));
          data.open("Plop");
      }
      catch(std::exception const&amp; e)
      {
          std::cout &lt;&lt; "Exception: " &lt;&lt; e.what() &lt;&lt; "\n";
          throw;
      }
  }
  
  % g++ main.cpp
  % ./a.out
  Exception: locale::facet::_S_create_c_locale name not valid
  Abort
  </code></pre>