Problems with Http-servlet : UTF-8
I am having some difficulty with UTF-8 encoded
chracaters in a Java servlet.
My servlet accepts an XML file conteining a question and returns an HTM page. The XML has cyrillic characters encoded as utf-8.. The rendering
servelt copes with this fine, and the HTML produced
displays OK in the browser (the response type on the
Java servelet has to be set to "text/html;
charset=UTF-8" for this to work).
I have to send cyrillic characters back in the
response to the question in a text field in the HTML form.The browser is
correctly sending back the byte stream (which I am
printing here as hex): d0b3d0bed180d0bed0b4 (this is a
cyrillic word correctly coded as utf-8).
However, on collecting the response (using
request.getParameterValues(fieldname)) the servlet
returns the byte stream: d0b3d0bed13fd0bed0b4.
A mistake in the fifth byte.
Can anyone help with this problem? Is there a known problem with the JAVA UTF-8 converter?
Regards
Graham

