Is that best practise though for setting the response's character encoding? I was wondering if it would be better to either:
1. Use the same character encoding for the response as was detected for the request
or 2. Examine the "accept-charset" header of the request to detect and use the client's preferred character encoding for the response.
Hi James, Here the MIME type of the following document is specified.Default for servlets is text/plain, but they usually explicitly specify text/html.For eg: if the document type were image, audio, video and application, the content type that dhd be set would be image/jpeg, audio/mp3, video/mp4, and application/msword respectively.
posted 9 years ago
Thanks for the reply Minakshi, but I was really asking about the character encoding rather than the MIME types. I.e., if the client sends you its data with ISO-8859-1 encoding or says it prefers that encoding, would it be considered best practice to return text content with the same encoding or just stick to UTF-8?