title: NCURSES border printing as q, x, when using UTF-8 and PuTTY
body: <p>I am trying to learn ncurses to add some functionality to my programs however I cannot seem to get my terminal settings to the point where the default ncurses window border shows up as expected.</p>
  
  <p>Here is the output I am getting for a window with a box border:</p>
  
  <pre><code>  lqqqqqqqqk
    x        x
    x        x
    x        x
    mqqqqqqqqj
  </code></pre>
  
  <p>However I should be getting this:</p>
  
  <pre><code>  ┌────────┐
    │        │
    │        │
    │        │
    └────────┘
  </code></pre>
  
  <p>The only thing I am able to find that fixes this issue is setting my PuTTY Remove Character Set to be Latin-1 instead of UTF-8, however this messes up all of my other applications including VIM.</p>
  
  <p>There were some related SO questions that I found (<a href="https://stackoverflow.com/questions/8483798/tmux-borders-displayed-as-x-q-instead-of-lines"><strong>1</strong></a> and <a href="https://superuser.com/questions/818948/putty-and-curses-line-display-issue"><strong>2</strong></a>) however neither of their solutions help me. The only interesting thing I pulled out of the second one is that if I run <code>printf '\342\224\224\342\224\200\342\224\220'</code> in my command line it prints out <code>└─┐</code> (which is correct...).</p>
  
  <p>Here is the simple program I am using to test this:</p>
  
  <pre><code> #include &lt;iostream&gt;
   #include &lt;ncurses.h&gt;
   #include &lt;string&gt;
   #include &lt;cstring&gt;
  
   int main() {
       WINDOW *my_win;
       int startx, starty, width, height;
       int ch;
  
       initscr();
       cbreak();
       keypad(stdscr, TRUE);
       refresh();
  
       int height = 5;
       int width = 10;
       my_win = newwin(height, width, 1, 2);
       box(my_win, 0, 0);
       wrefresh(my_win);
  
       getch();
  
       endwin();
       return 0;
   }
  </code></pre>
  
  <p>Any ideas what I could be doing wrong? Thanks!</p>