what should the charset be in the response to the server

Ok this is a very basic question but I cannot seem to find a clear
answer anywhere
 
I wrote a simple web  browser which is on it way of becoming
internationalized (UTF 8 support etc).
 
What I fail to understand is this:
 
I.  The web browser receives a page in lets say utf 8. It then converts
everything to utf16 (which is its internal choice of data
representation). what charset should the response to the server be. I
would guess the response should be in the original charset I,e utf8.
 
Consider this scenario:
Browser request for a page indicating its preferences through
Accept-charset header 
Server sends back a page with content type = utf 8
Browser parses the age and converts everything into utf 16. 
If there is a form the user can enter data into it... which is again
converted to the internal choice of utf 16
The browser is ready to send the form results back to the server...???
what should the encoding be here
 
 
Thanks for any help
 
raj
 

Received on Monday, 21 July 2003 13:31:27 UTC