All pastes #418074 Raw Edit

curses and utf-8

public text v1 · immutable
#418074 ·published 2007-03-31 12:04 UTC
rendered paste body
import curses, curses.wrapper, locale

locale.setlocale(locale.LC_ALL, '')
enc = locale.getpreferredencoding()

def main(stdscr):
    stdscr.addstr(10,10,u"hello world\u0698".encode(enc))
    stdscr.getch()

curses.wrapper(main)