[Python-Dev] Can the cgi module be made Unicode-aware?

Barry A. Warsaw barry@zope.com
Thu, 11 Apr 2002 10:37:51 -0400


>>>>> "SM" == Skip Montanaro <skip@pobox.com> writes:

    SM> The cgi programmer can't rely on charset information coming
    SM> from the browser and will need a way to tell the cgi module
    SM> what the charset of the incoming data is.

If you know.  You might know what you accept, but you might not know
what charset the data is coming back in.  E.g. the form that specifies
a message footer in Mailman 2.1 for a list that accepts 10 different
languages.  I guess you'd have to have some drop box that specified
the language the footer text was in, and then know the mapping from
that language to its charset.
    
    SM> After a bit of reflection, I'm not so sure I want to mess with
    SM> cgi.py.  :-)

Wise man!  cgi.py is one of those modules that sucks just less than
the amount of effort needed to rewrite it cleanly.

-Barry