title: Curses - Certain emoji (flags) deform terminal output
body: <p>When I output certain emoji (specifically flags) into a subwindow in curses, it deforms the output, even for output outside of that subwindow.</p>
  
  <p>Running:</p>
  
  <pre class="lang-py prettyprint-override"><code>
  import curses
  
  def draw_screen(stdscr):
  
      event = 0
      stdscr.clear()
      stdscr.refresh()
  
      while (event != ord('q')):
  
          emojis = ["", "", ""]
          # emojis = ["", "", ""]
  
          for i, emoji in enumerate(emojis):
              box1 = stdscr.subwin(11, 11, 0, i*12)
              box1.box()
              box1.addstr(0, 4, emoji)
  
          event = stdscr.getch()
  
  if __name__ == "__main__":
      curses.wrapper(draw_screen)
  </code></pre>
  
  <p>Produces:</p>
  
  <p><a href="https://i.stack.imgur.com/CkzNn.png" rel="noreferrer"><img src="https://i.stack.imgur.com/CkzNn.png" alt="enter image description here"></a></p>
  
  <p>If you switch the emoji for just the hearts it works fine:</p>
  
  <p><a href="https://i.stack.imgur.com/4pGuR.png" rel="noreferrer"><img src="https://i.stack.imgur.com/4pGuR.png" alt="enter image description here"></a></p>
  
  <p>I understand that the flag emoji is a sequence of regional indicator symbols, but I would have thought this should work, and I'm unsure how to fix it.</p>
  
  <p>I've tested this in iTerm and Terminal on Mac OS 10.13 &amp; 10.14.</p>
  
  <p>(I also noticed that some other multi point emoji (‍) print fine in raw Python but in curses are split into the two separate emoji that make them up. I'm not sure if this is related.)</p>