windows-curses
windows-curses copied to clipboard
window.hline/window.vline incorrectly displays Unicode characters
Happens only if the character provided as a string, not a character code. English is hard, see below.
import curses
def main(stdscr):
stdscr.hline(0, 0, "▓", 5); # would result in five of "²"
for row in range(0, 5):
stdscr.addch(1, row, "▓") # would result in five of "▓"
stdscr.hline(2, 0, ord("▓"), 5) # would result in five of "▓" as well
stdscr.getch()
curses.wrapper(main)