Jacob Kaplan-Moss wrote: > On 8/2/07, Daniel Brandt <[EMAIL PROTECTED]> wrote: >> I am recieving POST-data that is submitted to my application not via a >> form or a browser, but from other web applications, according to a >> known protocol. This data may or may not have the charset of the data >> set in the Content-Type header. > > Yuck, clients that don't speak HTTP correctly make me angry. > > Reading the RFC, though, I see that since HTTP 1.0 made "charset" > optional, it remains so in HTTP 1.1, and we're supposed to "guess" and > use ISO-8859-1 like you're doing in your code snippet. I suppose that > means that Django's request object should do pretty much what you've > done in this snippet. > > Care to try your hand at whipping up a patch? >
i made some quick tests (on-disk html file + netcat), and it seems that firefox does not send the charset at all when it submits a form... i admit it was only a quick test, so maybe i did it wrong, but if not, then it's perhaps not always a good idea to guess the charset... gabor --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---