title: std::locale::facet::_S_create_c_locale name not valid
body: <p>I'm trying to learn different locales and handling unicode and I chose to make all my strings UTF-8 and I decided to run the following code but for some reason it throws an error and I cannot figure out why.. I tried every locale so far and none except "C" works.. I tried the list of locales found here: <a href="http://gcc.gnu.org/onlinedocs/libstdc++/manual/localization.html" rel="noreferrer">http://gcc.gnu.org/onlinedocs/libstdc++/manual/localization.html</a></p>
  
  <p>and their example:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  
  int main()
  {
      std::locale::global(std::locale("en_US.UTF-8"));
  
      return 0;
  }
  </code></pre>
  
  <p>Results in:</p>
  
  <blockquote>
    <p>terminate called after throwing an instance of 'std::runtime_error'<br>
    what():  locale::facet::_S_create_c_locale name not valid</p>
  </blockquote>
  
  <p>What am I doing wrong?</p>
  
  <p>I'm using Mingw-Builds gcc/g++ 4.8.1 with the latest codeblocks on Windows 8. Language is set to EN_US and sometimes I switch to EN_GB.</p>