title: Using boost locale generator correctly
body: <p>I want to store <code>utf8</code> characters in my <code>std::strings</code>. For that I used <code>boost::locale</code> conversion routines.</p>
  
  <p>In my first test everything works as expected:</p>
  
  <pre><code>#include &lt;boost/locale.hpp&gt;
  
  std::string utf8_string = boost::locale::conv::to_utf&lt;char&gt;("Grüssen", "ISO-8859-15");
  std::string normal_string = boost::locale::conv::from_utf(utf8_string, "ISO-8859-15");
  </code></pre>
  
  <p>The expected Result is:</p>
  
  <pre><code>utf8_string = "GrÃ¼ssen"
  normal_string = "Grüssen"
  </code></pre>
  
  <p>To get rid of passing "ISO-8859-15" as string I tried to use <code>std::locale</code> instead.</p>
  
  <pre><code>// Create system default locale
  boost::locale::generator gen;
  std::locale loc=gen("ISO8859-15"); 
  std::locale::global(loc); 
  // This is needed to prevent C library to
  // convert strings to narrow 
  // instead of C++ on some platforms
  std::ios_base::sync_with_stdio(false);
  
  std::string utf8_string = boost::locale::conv::to_utf&lt;char&gt;("Grüssen", std::locale());
  std::string normal_string = boost::locale::conv::from_utf(utf8_string, std::locale());
  </code></pre>
  
  <p>But the result is not as expected:</p>
  
  <pre><code>utf8_string = "Gr|ssen"
  normal_string = "Gr|ssen"
  </code></pre>
  
  <p>What's wrong with my use of using <code>std::locale</code> and generator?
  (Compiler VC2015, charset multibyte)</p>