[issue6745] (curses) addstr() takes str in Python 3

2012-06-04 Thread STINNER Victor
STINNER Victor added the comment: The issue #12567 fixed this one: - umlaut3x.py now works in Python 3.3 with an encoding different than UTF-8: Python automatically detects (and uses) the locale encoding - getkey_sample.py can be patched to handle Unicode correctly using get_wch() instead of

[issue6745] (curses) addstr() takes str in Python 3

2011-10-28 Thread Petri Lehtinen
Changes by Petri Lehtinen : -- nosy: +petri.lehtinen ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue6745] (curses) addstr() takes str in Python 3

2011-07-14 Thread STINNER Victor
STINNER Victor added the comment: I created issue #12567 to fix the Unicode support of the curses module in Python 3. -- ___ Python tracker ___ _

[issue6745] (curses) addstr() takes str in Python 3

2010-11-17 Thread Andreas Stührk
Andreas Stührk added the comment: Note that getkey() is broken, too. I attached a simple script to demonstrate that. If you run it and enter some non-ascii input, you can see that getkey() returns an utf-8 encoded str (in my utf-8 environment at least, I haven't check if it's always utf-8 or

[issue6745] (curses) addstr() takes str in Python 3

2010-11-16 Thread Łukasz Langa
Łukasz Langa added the comment: We'll try to solve this for 3.2. -- assignee: -> lukasz.langa nosy: +lukasz.langa priority: normal -> high versions: +Python 3.2 -Python 3.1 ___ Python tracker _

[issue6745] (curses) addstr() takes str in Python 3

2009-08-27 Thread STINNER Victor
STINNER Victor added the comment: Here is a first patch to add a method setcharset() to the window class. Using my patch, you can fix your example by adding the line: screen.setcharset() before addstr(). It's an initial hack to fix the issue. Next steps are: - use something better than u

[issue6745] (curses) addstr() takes str in Python 3

2009-08-27 Thread Trundle
Trundle added the comment: Of course it works for you. As you stated in issue #4787, your locale is 'fr_FR.UTF-8'. And I don't want Python to guess my terminal's encoding. I want Python to respect my locale. Which is 'de...@euro', and not utf-8. --

[issue6745] (curses) addstr() takes str in Python 3

2009-08-27 Thread STINNER Victor
STINNER Victor added the comment: I don't really understand because your example, umlaut3x.py, works correctly on my computer (py3k, ubunty jaunty). > The point is, currently, it is broken if the user > does not use an utf-8 environment. So the problem is that the charset is hardcoded to utf8

[issue6745] (curses) addstr() takes str in Python 3

2009-08-27 Thread Trundle
Trundle added the comment: Yes, it uses a version of ncurses which supports wide characters, I checked that. I agree that using bytes instead may not be the preferred solution in Python 3. The point is, currently, it is broken if the user does not use an utf-8 environment. --

[issue6745] (curses) addstr() takes str in Python 3

2009-08-27 Thread STINNER Victor
STINNER Victor added the comment: See also issue #4787 -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue6745] (curses) addstr() takes str in Python 3

2009-08-27 Thread STINNER Victor
STINNER Victor added the comment: First, make sure that your Python3 build uses libncursesw and not libncurses, because libncursesw supports unicode, whereas libncurses doesn't... On UNIX, use the following command to check this: ldd $(./python -c "import _curses; print(_curses.__file__)")|grep

[issue6745] (curses) addstr() takes str in Python 3

2009-08-20 Thread Trundle
Changes by Trundle : Added file: http://bugs.python.org/file14751/umlaut3x.py ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue6745] (curses) addstr() takes str in Python 3

2009-08-20 Thread Trundle
New submission from Trundle : 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