Skip to content

Curses doesn't display octants #127795

@cool-RR

Description

@cool-RR

Bug report

Bug description:

I would like to get Unicode octants to display correctly in VisiData. saulpw/visidata#2626

For some reason these characters don't show correctly.

After midichef debugged it, he found that the curses module doesn't display these characters correctly:

#!/usr/bin/python
import curses

octants = ''.join(chr(0x1cd00+i) for i in range(230))
bracketed = '[' + octants + ']'
def main(stdscr):
    stdscr.addstr(f'octants drawn in curses: {bracketed}')
    stdscr.refresh()
    stdscr.getch()

try:
    curses.wrapper(main)
except KeyboardInterrupt:
    pass
print(f'octants printed to stdout: {bracketed}')

Output:

image

image

Is this a bug in curses or maybe I misunderstood something about how to operate it?

CPython versions tested on:

3.12

Operating systems tested on:

Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions