[Python-bugs-list] [ python-Bugs-734170 ] PyArg_ParseTuple("u") inconstency

SourceForge.net noreply@sourceforge.net
Wed, 07 May 2003 13:02:16 -0700


Bugs item #734170, was opened at 2003-05-07 22:02
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=734170&group_id=5470

Category: Unicode
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Ronald Oussoren (ronaldoussoren)
Assigned to: M.-A. Lemburg (lemburg)
Summary: PyArg_ParseTuple("u") inconstency

Initial Comment:
PyArg_ParseTuple behaves strangly with the format
character "u" when a plain string is passed as the
argument. This seems to perform the conversion
value.decoded("utf-16"), which is very surprising and
inconsistent with the behaviour of the python
expression unicode(value) with is equivalent with
value.decode("ascii").

The current behaviour will confuse users that pass
plain strings to extension functions expecting unicode
arguments.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=734170&group_id=5470