this is probably not the right place to ask, but I found some irritating behaviour with the cgi module and are unsure if it's a bug (seen on python2.5 and python2.6) The problem is this: >>> import cgi >>> cgi.FieldStorage(environ={'QUERY_STRING':u'a=b'}) FieldStorage(None, None, [MiniFieldStorage('a\x00', '\x00b\x00')]) >>> cgi.FieldStorage(environ={'QUERY_STRING':'a=b'}) FieldStorage(None, None, [MiniFieldStorage('a', 'b')])
When creating a FieldStorage with an environment that contains a unicode 'QUERY_STRING' value, garbage is returned. The ultimate problem seems to be, that the QUERY_STRING is converted to a cStringIO object which holds only the memory representation of unicode strings. Regards, Stephan _______________________________________________ Web-SIG mailing list Web-SIG@python.org Web SIG: http://www.python.org/sigs/web-sig Unsubscribe: http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com