This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients gvanrossum, janssen, jimjjewett, lemburg, loewis, mgiuca, orsenthil, pitrou, thomaspinckney3
Date 2008-08-10.10:49:51
SpamBayes Score 3.76854e-05
Marked as misclassified No
Message-id <1218365389.5894.15.camel@fsol>
In-reply-to <>
Le dimanche 10 août 2008 à 07:05 +0000, Matt Giuca a écrit :
> I don't think it's worth the extra code bloat and performance hit just
> to implement a feature whose only use is producing invalid URIs (since
> URIs are supposed to only have ASCII characters).


> If the QUERY_STRING is "foo=w%FCt" (Latin-1), with errors='strict', you
> get a UnicodeDecodeError when you call cgi.FieldStorage(). With
> errors='replace', the variable foo will be "w�t". I think in general I'd
> rather have '�'s in my program (representing invalid user input) than
> exceptions, since this is usually a user input error, not a programming
> error.

Invalid user input? What if the query string comes from filling a form?
For example if I search the word "numéro" in a latin1 Web site, I get
the following URL:
Date User Action Args
2008-08-10 10:50:03pitrousetrecipients: + pitrou, lemburg, gvanrossum, loewis, jimjjewett, janssen, orsenthil, thomaspinckney3, mgiuca
2008-08-10 10:49:52pitroulinkissue3300 messages
2008-08-10 10:49:51pitroucreate