Problem with curses and UTF-8

Ian Ward ian at excess.org
Wed Feb 8 17:46:49 EST 2006


Martin v. Löwis wrote:

> If that was Python's configure: don't do that. Instead, hack setup.py
> to make it change the compiler/linker settings, or even edit the
> compiler/linker line manually at first.

Ok, that compiled.

Now when I run the same test:

import curses
s = curses.initscr()
s.addstr('\xc3\x85 U+00C5 LATIN CAPITAL LETTER A WITH RING ABOVE\n')
s.addstr('\xc3\xa5 U+00F5 LATIN SMALL LETTER O WITH TILDE')
s.refresh()
s.getstr()
curses.endwin()


This is what I see:

  +00C5 LATIN CAPITAL LETTER A WITH RING ABOVE
  +00F5 LATIN SMALL LETTER O WITH TILDE


so, the UTF-8 characters didn't appear and the " U" at the beginning 
became just " ".

Ian Ward




More information about the Python-list mailing list