title: Visual Studio C++ outputting �� instead of 汉字?
body: <p>I am trying to print out the string 汉字 in Visual Studio 2019 C++.
  Something I think I should say is probably, I'm on Windows 10 and I have been trying to figure this out using the internet for an hour to no prevail.</p>
  <p>This is my code:</p>
  <pre class="lang-cpp prettyprint-override"><code>#include &lt;iostream&gt;
  
  int main(void) {
      std::wstring myWString = L&quot;汉字&quot;; // Tried a wstring, didn't output anything
      std::string myString = &quot;汉字&quot;; // Tried using a normal string, it outputted the �'s
      std::wcout &lt;&lt; myWString &lt;&lt; std::endl;
      std::cout &lt;&lt; myString &lt;&lt; std::endl;
  }
  </code></pre>
  <p>In the projects properties, I added <code>/source-charset:utf-8 /execution-charset:utf-8</code> to the additional options in Command Line under C/C++, and I also checked <code>Beta: Use Unicode UTF-8 for worldwide language support.</code> in my region settings. So why can't I print out these characters, and is this fixable, if so how?</p>
  <p>Fixed: I went to my registry editor into <code>HKEY_CURRENT_USER\Control Panel\Input Method</code>, added a new value named EnableHexNumpad and set the data to '1'. After that I restarted my PC and it worked.</p>