New submission from Trundle <andy-pyt...@hammerhartes.de>:

In Python 3, curses requires a str for addstr() where I think it should
take bytes instead. Otherwise it is impossible to output anything other
than ASCII (which is even more or less stated on top of curses'
documentation).

See the attached script "umlaut2x.py" for Python 2.6: Outputting
umlauts works fine, both in single-byte and multi-byte environments.

The attached script "umlaut3x.py" is the same script translated to
Python 3. Note that the output here always seems to be utf-8, which is
plain wrong.

A quick test where I changed addstr() to take bytes instead of str
confirmed that outputting other characters than ASCII would work then
in Python 3, too. There are perhaps more places where the types are
wrong. If someone confirms this issue and it is desired, I could
provide a patch.

----------
components: Library (Lib)
files: umlaut2x.py
messages: 91786
nosy: Trundle
severity: normal
status: open
title: (curses) addstr() takes str in Python 3
type: behavior
versions: Python 3.1
Added file: http://bugs.python.org/file14750/umlaut2x.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue6745>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to