title: Why Unicode characters are not displayed properly in terminal with GCC?
body: <p>I've written a small C program:
  </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;locale.h&gt;
  
  int main() {
      wprintf(L"%s\n", setlocale(LC_ALL, "C.UTF-8"));
      wchar_t chr = L'┐';
      wprintf(L"%c\n", chr);
  }
  </code></pre>
  
  <p>Why doesn't this print the character <code>┐</code> ? </p>
  
  <p>Instead it prints gibberish. <img src="https://i.stack.imgur.com/XsN3e.png" alt="unicodetest"></p>
  
  <p>I've checked:</p>
  
  <ul>
  <li>tried compiling without setlocale, same result</li>
  <li>the terminal itself can print the character, I can copy-paste it to terminal from text-editor, it's gnome-terminal on Ubuntu</li>
  <li>GCC version is 4.8.2</li>
  </ul>