Becoming Unicode Aware

Egil M?ller redhog at takeit.se
Fri Oct 29 13:56:57 EDT 2004


> Unfortunately the http standard seems to lack a specification how form data
> encoding is to be transferred. But it seems that most browser which
> understand a certain encoding your page is delivered in will use that for
> replying.

Fourtunately, this is utter bullshit :)

Send the Content-Type http header to the client, with the value
"text/html; charset=UTF-8". You may have to send it both as an HTTP
header and as a meta http-equiv-HTML tag to get it to work with all
browsers though. Usually (I don't knwo if it is really in the standard
that the client have to behave this way), the client will reply in the
same encoding as you sent your page with the form. Anyway, the client
will prolly set a similar tag upon reply, but I don't know about that,
and don't care as just expecting the same encoding works for all major
browsers (mozilla, IE, opera).



More information about the Python-list mailing list