Hi Gabor,

First off, I just realized that the code I posted earlier has a small bug.

Line 17 should've read:

    17             for key, vallist in cgiargs.lists():

the old code used 'items()' which only pulls a single value out of
multivaluedict.

On to unicode....

The reason I'm paranoid about handling GET/POST data is because MSIE
is retarded.

Here's two good references:

http://ln.hixie.ch/?start=1144794177&count=1
http://www.joelonsoftware.com/articles/Unicode.html

Basically, IE ignores the content-type header and figures out the
content type by doing content sniffing.

So sometimes, IE guesses wrong - and you get garbage if you just use
the Content-Type header.  If you use the meta tag, it forces UTF8 in
almost all browsers.

victor "MSIE is a four letter word" ng

On 12/11/06, Gábor Farkas <[EMAIL PROTECTED]> wrote:
> well, from my experiences, the most important thing is the content-type
> http header. if you explicitly tell there the charset, then the browser
> will use that, and completely ignore the charset-specification in the
> html file.
>
> also, may i ask, why such a paranoid way of working with GET/POST?
> because (also, only my experience, no big testing), the browsers submit
> their form-data in the charset in which the page containing the form was.
>
> so if you send to the browser an utf-8 page, it's submitted data is
> going to be utf-8.
>
>
> gabor
>
> >
>


-- 
"Never attribute to malice that which can be adequately explained by
stupidity."  - Hanlon's Razor

--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@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-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to