title: How can I print (☞ﾟヮﾟ)☞ with Ncurses?
body: <p>I would like to print (☞ﾟヮﾟ)☞ with the Ncurses library using C++ in Ubuntu.</p>
  
  <p>First of all, you can do this by simply having:</p>
  
  <pre><code>std::cout &lt;&lt; "(☞ﾟヮﾟ)☞" &lt;&lt; std::endl;
  </code></pre>
  
  <p>And it works just fine.</p>
  
  <p>However, when printing using Ncurses, I think that you need to use <code>printw(char[])</code>. In which case, I try something like this:</p>
  
  <pre><code>std::string str = "(☞ﾟヮﾟ)☞";   // String
  initscr();                     // Start curses mode
  printw(str.c_str());           // Print
  getch();                       // Wait for input
  endwin();                      // Exit curses mode
  </code></pre>
  
  <p>But it outputs:</p>
  
  <blockquote>
    <p>(�~X~^��~<em>�~C���~</em>)�~X~^</p>
  </blockquote>
  
  <p>I had thought that maybe it was <code>c_str()</code>'s fault, but when I do it with <code>std::cout</code> it works just fine too.</p>
  
  <p>How can I print that text with Ncurses? Why does it work with <code>std::cout</code> and not with Ncurses' <code>printw(char[])</code>?</p>
  
  <p>I compile using</p>
  
  <pre><code>g++ Main.cpp -lncurses
  </code></pre>
  
  <p>In a 64-bit machine. Ubuntu (64 bits too) is running in VirtualBox with OSX as host.</p>
  
  <hr>
  
  <p><strong>Update</strong>:</p>
  
  <p>I've been redirected to <a href="https://stackoverflow.com/a/9927113/555690">https://stackoverflow.com/a/9927113/555690</a>. The solution there doesn't seem to fix my problem - instead, this is how it looks now:</p>
  
  <blockquote>
    <p>(M-b~X~^M-oM->~<em>M-c~CM-.M-oM->~</em>)M-b~X~^</p>
  </blockquote>