windows-curses icon indicating copy to clipboard operation
windows-curses copied to clipboard

window.hline/window.vline incorrectly displays Unicode characters

Open Kriper1111 opened this issue 3 years ago • 0 comments

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)

Kriper1111 avatar May 08 '21 10:05 Kriper1111