[Python-bugs-list] [ python-Bugs-660165 ] PyFile_GetLine() doesn't grok unicode
noreply@sourceforge.net
noreply@sourceforge.net
Mon, 30 Dec 2002 17:02:30 -0800
Bugs item #660165, was opened at 2002-12-30 16:15
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=660165&group_id=5470
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Guido van Rossum (gvanrossum)
>Assigned to: Martin v. Löwis (loewis)
Summary: PyFile_GetLine() doesn't grok unicode
Initial Comment:
PyFile_GetLine() complains when object.readline()
returns a Unicode string. This is only used by
raw_input() (and possible by 3rd party extensions).
Could we change it to either allow Unicode strings, or
at least attempt to convert the result to str()?
----------------------------------------------------------------------
>Comment By: Guido van Rossum (gvanrossum)
Date: 2002-12-30 20:02
Message:
Logged In: YES
user_id=6380
Wanna cook up a patch?
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2002-12-30 18:05
Message:
Logged In: YES
user_id=21627
I'm in favour of allowing raw_input to return Unicode
objects. This would follow the principle that you shall
convert to a byte string at the latest possible point in
processing (i.e. immediately before the byte-oriented storage).
It may surprise applications, but it (in itself) isn't an
incompatible change (as you now get an exception).
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=660165&group_id=5470