[issue1688] Incorrectly displayed non ascii characters in prompt using input() - Python 3.0a2

2008-09-21 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

I'm ok with this patch.

--
keywords:  -needs review
nosy: +benjamin.peterson

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1688
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1688] Incorrectly displayed non ascii characters in prompt using input() - Python 3.0a2

2008-09-21 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:

Committed r66545.

--
resolution:  - fixed
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1688
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1688] Incorrectly displayed non ascii characters in prompt using input() - Python 3.0a2

2008-09-20 Thread Vlastimil Brom

Vlastimil Brom [EMAIL PROTECTED] added the comment:

While I am not sure about the status of this somewhat older issue, I 
just wanted to mention, that the behaviour remains the same in Python 
3.0rc1 (XPh SP3, Czech)

Python 3.0rc1 (r30rc1:66507, Sep 18 2008, 14:47:08) [MSC v.1500 32 bit 
(Intel)] on win32
Type help, copyright, credits or license for more information.
 input(ěšč: )
─Ť┼í─Ź: řžý
'řžý'
 print(ěšč: )
ěšč:


Is the patch above supposed to have been committed, or are there yet 
another difficulties?
(Not that it is a huge problem (for me), as applications dealing with 
non ascii text probably would use a gui, rather than relying on a 
console, but it's a kind of surprising.)

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1688
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1688] Incorrectly displayed non ascii characters in prompt using input() - Python 3.0a2

2008-09-20 Thread Martin v. Löwis

Martin v. Löwis [EMAIL PROTECTED] added the comment:

Amaury, what further review of the patch do you desire? I had already
commented that I consider the patch correct, except that it might use
stdout_encoding instead.

Also, I wouldn't consider this a release blocker. It is somewhat
annoying that input produces moji-bake in certain cases (i.e. non-ASCII
characters in the prompt, and a non-UTF-8 terminal), but if the patch
wouldn't make it into 3.0, we can still fix it in 3.0.1.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1688
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1688] Incorrectly displayed non ascii characters in prompt using input() - Python 3.0a2

2008-09-20 Thread Guido van Rossum

Guido van Rossum [EMAIL PROTECTED] added the comment:

Given MvL's review, assuming it fixes the Czech problem, I'm all for
applying it.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1688
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1688] Incorrectly displayed non ascii characters in prompt using input() - Python 3.0a2

2008-09-20 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:

Here is a new version of the patch: the PyString* functions were renamed
to PyBytes*, and it now uses stdout_encoding.

About the release blocker status: I agree it is not so important, I
just wanted to express my it's been here for long, it's almost ready,
it would be a pity not to have it in the final 3.0 feelings.

--
keywords: +patch
Added file: http://bugs.python.org/file11531/inputprompt.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1688
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1688] Incorrectly displayed non ascii characters in prompt using input() - Python 3.0a2

2008-01-11 Thread Martin v. Löwis

Martin v. Löwis added the comment:

 Isn't it enough to encode the prompt with the console encoding, instead
 of letting the default utf-8 conversion? This patch corrects the issue
 on Windows:

Sounds right. Technically, you should be using the stdout encoding, but
I don't think it should ever differ from the stdin_encoding.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1688
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1688] Incorrectly displayed non ascii characters in prompt using input() - Python 3.0a2

2008-01-10 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

Isn't it enough to encode the prompt with the console encoding, instead
of letting the default utf-8 conversion? This patch corrects the issue
on Windows:

Index: ../Python/bltinmodule.c
===
--- ../Python/bltinmodule.c (revision 59843)
+++ ../Python/bltinmodule.c (working copy)
@@ -1358,12 +1358,19 @@
else
Py_DECREF(tmp);
if (promptarg != NULL) {
-   po = PyObject_Str(promptarg);
+   PyObject *stringpo = PyObject_Str(promptarg);
+   if (stringpo == NULL) {
+   Py_DECREF(stdin_encoding);
+   return NULL;
+   }
+   po = PyUnicode_AsEncodedString(stringpo,
+   PyUnicode_AsString(stdin_encoding), NULL);
+   Py_DECREF(stringpo);
if (po == NULL) {
Py_DECREF(stdin_encoding);
return NULL;
}
-   prompt = PyUnicode_AsString(po);
+   prompt = PyString_AsString(po);
if (prompt == NULL) {
Py_DECREF(stdin_encoding);
Py_DECREF(po);

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1688
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1688] Incorrectly displayed non ascii characters in prompt using input() - Python 3.0a2

2008-01-03 Thread Guido van Rossum

Guido van Rossum added the comment:

Cool.

I suspect Unix will also require a customized version to be used in case
GNU readline isn't present.

And I wouldn't be surprised if GNU readline itself doesn't handle UTF-8
properly either!

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1688
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1688] Incorrectly displayed non ascii characters in prompt using input() - Python 3.0a2

2007-12-30 Thread Amaury Forgeot d'Arc

Changes by Amaury Forgeot d'Arc:


--
nosy: +amaury.forgeotdarc

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1688
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1688] Incorrectly displayed non ascii characters in prompt using input() - Python 3.0a2

2007-12-29 Thread Vlastimil Brom

Vlastimil Brom added the comment:

First sorry about a delayed response, but moreover, I fear, preparing a 
patch would be far beyond my programming competence; sorry about that.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1688
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1688] Incorrectly displayed non ascii characters in prompt using input() - Python 3.0a2

2007-12-23 Thread Martin v. Löwis

Martin v. Löwis added the comment:

Would you like to work on a patch?

--
nosy: +loewis

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1688
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com