[Python-Dev] PyArg_ParseTuple and unicode

M.-A. Lemburg mal@lemburg.com
Wed, 28 Nov 2001 17:16:34 +0100


Jack Jansen wrote:
> 
> MAL wrote:
> > Jack Jansen wrote:
> > >
> > > I had expected the PyArg_ParseTuple() "u" specifier to automatically convert
> > > string objects to unicode strings with the default encoding (just as the
> > > reverse is true for "s"), but to my surprise it doesn't.
> > [...]
> ...
> > If you think this is needed, please upload a feature request to
> > SF and assign it to me. I'll look into this after the feature
> > freeze then.
> 
> As I'm doing this project with a very old Python I might as well do it myself
> (unless I can't figure out how:-), and then I'll put the patch in sourceforge,
> hand it over to you and you can turn my gibberish into real C:-)

Ok. You could use the existing "e" parser marker code
as template -- I'd suggest to use "eu" and "eu#" as new "e" marker
options.

This won't go into 2.2 though...

-- 
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
______________________________________________________________________
Consulting & Company:                           http://www.egenix.com/
Python Software:                        http://www.lemburg.com/python/